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?

Join Us as a Local Community Builder!

Passionate about hosting events and connecting people? Help us grow a vibrant local community—sign up today to get started!

Sign Up Now
OSZAR »