cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results for 
Search instead for 
Did you mean: 

Error when create an external location using code

noimeta
Contributor III

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?

15 REPLIES 15

Lokeshv
New Contributor II

Hey everyone,

I'm facing an issue with retrieving data from a volume or table that contains a string with a symbol, for example, 'databricks+'. Whenever I try to retrieve this data, I encounter a syntax error. Can anyone help me resolve this issue?

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you won’t want to miss the chance to attend and share knowledge.

If there isn’t a group near you, start one and help create a community that brings people together.

Request a New Group