Cannot save queries that query azure data lake with OPENROWSET syntax #32345
-
Hello, I successfully ran the below query to fetch data from data lake. i needed to enable 'Allow DML/DDL '. SELECT * FROM OPENROWSET(
BULK
'https://mydatalake.dfs.core.windows.net/mydata/myevents/partition=1/partition=2/partition=3/partition=4/*/*/*/*/*/*.parquet',
FORMAT = 'PARQUET'
)
AS records_json ;
exception is as below ERROR:flask_appbuilder.api:Error parsing near''https://mydatalake.dfs.core.windows.net/mydata/myevents/partition=1/partition=2/partition=3/partition=4/*/*/*/*/*/*.parquet'' at line 3:101
superset_app | Traceback (most recent call last):
superset_app | File "/app/superset/sql/parse.py", line 266, in _parse
superset_app | return sqlglot.parse(script, dialect=dialect)
superset.exceptions.SupersetParseError: Error parsing near ''https://mydatalake.dfs.core.windows.net/mydata/myevents/partition=1/partition=2/partition=3/partition=4/*/*/*/*/*/*.parquet'' at line 1:101
sqlglot.errors.ParseError: Expecting ). Line 4, Col: 101. Is there any way to fix this issue? What configuration changes should i make in superset? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
A similar issue was discussed in a thread about connecting to Azure Data Lake Gen 2 using
These approaches might help you resolve the issue with saving queries that use To continue talking to Dosu, mention @dosu. Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other |
Beta Was this translation helpful? Give feedback.
-
@dosu I can run the query but not save it. the error occurs in sqlglot library. |
Beta Was this translation helpful? Give feedback.
-
@dosu I solved it. you need to sorround the file paths by small brackets. this solves the issue
|
Beta Was this translation helpful? Give feedback.
@dosu I solved it. you need to sorround the file paths by small brackets. this solves the issue
SELECT * FROM OPENROWSET( BULK ( 'https://mydatalake.dfs.core.windows.net/mydata/myevents/partition=1/partition=2/partition=3/partition=4/*/*/*/*/*/*.parquet'), FORMAT = 'PARQUET' ) AS records_json ;