CREATE EXTERNAL LOCATION read only through SQL

barendlinders
New Contributor II

Hello,

I have set up a storage credential with READ ONLY access to my Azure storage account (landing-zone). I want to create an EXTERNAL LOCATION using SQL, set the EXTERNAL LOCATION to read only and use the read-only storage credential I made.

I cannot find any documentation on the SQL version where I can specify the Advanced Options that are available through the UI. Is this a simple case of mismatch between UI (api) and SQL?

If I simply run the 

CREATE EXTERNAL LOCATION IF NOT EXISTS with said storage credential I get the following error:
 
```
PERMISSION_DENIED: User cannot create or write to external locations or tables using a read-only storage credential read_storage
```
 
barendlinders_0-1736427738959.png

 

Walter_C
Databricks Employee
Databricks Employee

It seems that this option is only available via UI or API https://docs.databricks.com/api/workspace/externallocations/create 

View solution in original post

barendlinders
New Contributor II

Thanks for clarifying @Walter_C !

Walter_C
Databricks Employee
Databricks Employee

Sure, happy to help, let me know in case you need any other assistance.