You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/synapse-analytics/metadata/database.md
+5-26Lines changed: 5 additions & 26 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,35 +6,29 @@ author: MikeRys
6
6
ms.service: synapse-analytics
7
7
ms.topic: overview
8
8
ms.subservice:
9
-
ms.date: 04/15/2020
9
+
ms.date: 05/01/2020
10
10
ms.author: mrys
11
11
ms.reviewer: jrasnick
12
12
---
13
13
14
14
# Azure Synapse Analytics shared database
15
15
16
-
Azure Synapse Analytics allows the different computational workspace engines to share databases and tables between its Spark pools (preview), SQL on-demand (preview) engine, and SQL pools.
16
+
Azure Synapse Analytics allows the different computational workspace engines to share databases and tables between its Spark pools (preview) and SQL on-demand (preview) engine.
A database created with a Spark job will become visible with that same name to all current and future Spark pools (preview) in the workspace as well as the SQL on-demand engine.
21
21
22
-
If there are SQL pools in the workspace that have metadata synchronization enabled, or if you create a new SQL pool with the metadata synchronization enabled, these Spark created databases are automatically mapped into special schemas in the SQL pool database.
22
+
The Spark default database, called `default`, will also be visible in the SQL on-demand context as a database called `default`.
23
23
24
-
Each schema is named after the Spark database name with an additional `$` prefix. Both the external and managed tables in the Spark-generated database are exposed as external tables in the corresponding special schema.
25
-
26
-
The Spark default database, called `default`, will also be visible in the SQL on-demand context as a database called `default`, and in any of the SQL pool databases with metadata synchronization turned on as the schema `$default`.
27
-
28
-
Since the databases are synchronized to SQL on-demand and the SQL pools asynchronously, there will be a delay until they appear.
24
+
Since the databases are synchronized to SQL on-demand asynchronously, there will be a delay until they appear.
29
25
30
26
## Manage a Spark created database
31
27
32
28
Use Spark to manage Spark created databases. For example, delete it through a Spark pool job, and create tables in it from Spark.
33
29
34
30
If you create objects in a Spark created database using SQL on-demand, or try to drop the database, the operation will succeed. But, the original Spark database won't be changed.
35
31
36
-
If you try to drop the synchronized schema in a SQL pool, or try to create a table in it, Azure returns an error.
37
-
38
32
## Handling of name conflicts
39
33
40
34
If the name of a Spark database conflicts with the name of an existing SQL on-demand database, a suffix is appended in SQL on-demand to the Spark database. The suffix in SQL on-demand is `_<workspace name>-ondemand-DefaultSparkConnector`.
@@ -46,7 +40,7 @@ For example, if a Spark database called `mydb` gets created in the Azure Synapse
46
40
47
41
## Security model
48
42
49
-
The Spark databases and tables, along with their synchronized representations in the SQL engines will be secured at the underlying storage level.
43
+
The Spark databases and tables, along with their synchronized representations in the SQL engine will be secured at the underlying storage level.
50
44
51
45
The security principal who creates a database is considered the owner of that database, and has all the rights to the database and its objects.
52
46
@@ -74,22 +68,7 @@ SELECT * FROM sys.databases;
74
68
75
69
Verify that `mytestdb` is included in the results.
76
70
77
-
### Exposing a Spark database in a SQL pool
78
-
79
-
With the database created in the previous example, now create a SQL pool in your workspace named `mysqlpool` that enables metadata synchronization.
80
-
81
-
Run the following statement against the `mysqlpool` SQL pool:
82
-
83
-
```sql
84
-
SELECT*FROMsys.schema;
85
-
```
86
-
87
-
Verify the schema for the newly created database in the results.
88
-
89
71
## Next steps
90
72
91
73
-[Learn more about Azure Synapse Analytics' shared metadata](overview.md)
92
74
-[Learn more about Azure Synapse Analytics' shared metadata Tables](table.md)
93
-
94
-
<!-- - [Learn more about the Synchronization with SQL on-demand](overview.md)
95
-
- [Learn more about the Synchronization with SQL pools](overview.md)-->
0 commit comments