โ09-29-2022 01:11 AM
I'm trying to create an external location from notebook, and I got this kind of error
[PARSE_SYNTAX_ERROR] Syntax error at or near 'LOCATION'(line 1, pos 16)
== SQL ==
CREATE EXTERNAL LOCATION IF NOT EXISTS test_location URL 's3://test-bronze/db/test_schema/test_table' WITH (STORAGE CREDENTIAL test-credential)
----------------^^^
I tried with DBR10.4, DBR11.1 and DBR11.2, unfortunately, none of them worked.
However, SHOW EXTERNAL LOCATIONS and DESCRIBE EXTERNAL LOCATION *** work just fine.
Also, I can create an external location from the UI without any problem
Anyone knows how to solve this issue?
โ11-09-2022 02:00 PM
It seems like error is due to '-' in the storage credential name, you need to use backticks `some-name`:
CREATE EXTERNAL LOCATION IF NOT EXISTS test_location URL 's3://test-bronze/db/test_schema/test_table' WITH (STORAGE CREDENTIAL `test-credential`)
thanks,
Patryk.
โ09-29-2022 01:25 AM
Seems to be ok at first sight. Do you run it from Databricks SQL ( the SQL persona)?
โ09-29-2022 01:29 AM
I tried with both Databricks SQL and notebook, but they outputted the same error.
โ09-29-2022 01:35 AM
can you create an external location from that particular location using the UI?
To exclude that being an issue...
โ09-29-2022 01:42 AM
yes, the UI works fine
โ09-29-2022 02:17 AM
Strange. I can't test it myself as I am on Azure.
maybe it is the url you provide? On Azure I also have to define the blob container and storage account:
abfss://<container_name>@<storage_account>.dfs.core.windows.net/<path>
โ09-29-2022 04:07 AM
I just imitated the code from an example here https://docs.databricks.com/data-governance/unity-catalog/manage-external-locations-and-credentials.... and it's also the same path when I inputted to the UI. Now, I have no idea why it doesn't work.
โ10-02-2022 04:00 PM
Hi @noi metaaphanonโ , We're extremely sorry for the negative experience you're facing with the above example. Can you please help us with filing a support ticket for the same here?
โ10-02-2022 08:01 PM
Hi @Kaniz Fatmaโ ,
Thank you very much for your response.
I've been trying to submit a case, but it always asks me to sign in.
After I signed in with my Databricks workspace account, it jumped to the community home page. So, I came to this post and clicked your link again, then it asked me to log in again.
โ10-02-2022 10:04 PM
Hi @noi metaaphanonโ, Thank you for your feedback. Our team shall reach out and help you with the issue you've been facing. Please drop an email at community@databricks.com.
โ10-11-2022 12:48 PM
I am facing the same problem. Was this resolved? If so, what was the solution?
โ10-11-2022 08:24 PM
unfortunately, not yet
โ10-13-2022 12:19 AM
Hi @Constantin Sapkidisโ and @noi metaaphanonโ, Please drop an email at community@databricks.com.
โ11-09-2022 12:30 PM
Hi, is there a new status here? Is there a workaround which does not include the GUI? I am using Databricks on Azure and i am running into the same issue.
Thx.
โ11-09-2022 06:19 PM
In my case, yes, the problem is solved. Please check the best answer.
Join our fast-growing data practitioner and expert community of 80K+ members, ready to discover, help and collaborate together while making meaningful connections.
Click here to register and join today!
Engage in exciting technical discussions, join a group with your peers and meet our Featured Members.