Skip to content

Commit 0758bef

Browse files
Create workspace-level data reader example
1 parent f3c6f7c commit 0758bef

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

articles/synapse-analytics/metadata/database.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,18 @@ Lake databases do not allow creation of custom T-SQL objects, such as schemas, u
6060

6161
## Examples
6262

63+
### Create workspace-level data reader
64+
65+
A login with `GRANT CONNECT ANY DATABASE` and `GRANT SELECT ALL USER SECURABLES` permisisons is able to read all tables using the serverless SQL pool, but not able to create SQL databases or modify the objects in them.
66+
67+
```sql
68+
CREATE LOGIN [wsdatareader@contoso.com] FROM EXTERNAL PROVIDER
69+
GRANT CONNECT ANY DATABASE TO [wsdatareader@contoso.com]
70+
GRANT SELECT ALL USER SECURABLES TO [wsdatareader@contoso.com]
71+
```
72+
73+
This script enables you to create users without admin priviliges who can read any table in Lake databases.
74+
6375
### Create and connect to Spark database with serverless SQL pool
6476

6577
First create a new Spark database named `mytestdb` using a Spark cluster you have already created in your workspace. You can achieve that, for example, using a Spark C# Notebook with the following .NET for Spark statement:

0 commit comments

Comments
 (0)