Is it possible to directly connect to Azure Datalake Gen 2 using OPENROWSET from superset? #32309
-
| 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 ;
When i try i get below errors. I can however read from a view or table correctly 
 
 | 
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
| Hey @surajsrivathsa! I'm here to help you with bug fixes, answer your questions, and guide you on becoming a contributor. Let's squash those bugs together! 🤖 The error you're encountering suggests that Superset is unable to confirm that the  The error message also indicates a parsing issue with the SQL syntax, particularly around the URL in the  To work around this, you might consider creating a view or table in your database that encapsulates the  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.
SQLAlchemy itself doesn't directly support
OPENROWSETas it is a SQL Server-specific function. However, you can execute raw SQL queries using SQLAlchemy, which allows you to useOPENROWSETif your database connection supports it.In Superset, you can execute raw SQL queries through SQL Lab, but the issue you're facing is related to Superset's SQL parsing and read-only query validation. Superset needs to confirm that a query is read-only, and if it can't parse the query to confirm this, it will reject it. This is controlled by the
allow_dmlattribute of theDatabaseobject. Ifallow_dmlis set toFalse, Superset will not allow queries it cannot confirm as read-only [1].To use
OPENR…