Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Determination of the select queries in BaseEngineSpec #15011

Closed
xneg opened this issue Jun 7, 2021 · 1 comment
Closed

Determination of the select queries in BaseEngineSpec #15011

xneg opened this issue Jun 7, 2021 · 1 comment

Comments

@xneg
Copy link
Contributor

xneg commented Jun 7, 2021

Hello!

We are now developing a new SQLAlchemy dialect for Kusto (Azure Data Explorer) and want add support for Kusto database in Superset in nearly future. (This also covers #10646.)
Kusto language has two dialects: SQL and KQL. While there is no problem with SQL dialect, we also want to integrate KQL in Superset.

Problem
KQL select queries do not contain the word "SELECT" so they look like
MyTable | take 10 (this is equivalent of Select * from MyTable Limit 10).
The absence of the "SELECT" keyword breaks the limit behavior in SQLLab because it relies on the sqlparse package and we can't add a limit to queries from UI.

Proposed solution
The solution is to make the determination of the select queries in BaseEngineSpec so that you can override it in your own spec. This is the same way how base dialect determines read-only queries with is_readonly_query.

We will provide PR to implement this small feature.

Thank you!

@xneg
Copy link
Contributor Author

xneg commented Jun 8, 2021

Closed by #15013

@xneg xneg closed this as completed Jun 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant