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

Unable to use DB names with prefixes for YDB #31322

Closed
3 tasks done
vgvoleg opened this issue Dec 6, 2024 · 1 comment · Fixed by #31323
Closed
3 tasks done

Unable to use DB names with prefixes for YDB #31322

vgvoleg opened this issue Dec 6, 2024 · 1 comment · Fixed by #31323
Labels
sqllab Namespace | Anything related to the SQL Lab

Comments

@vgvoleg
Copy link
Contributor

vgvoleg commented Dec 6, 2024

Bug description

Superset with YDB works fine with queries like

SELECT * FROM db_name

in SQL Lab.

But if database has a prefix, which should be defined like:

SELECT * from `prefix/db_name`

It fails with parsing error

Screenshots/recordings

image

Superset version

master / latest-dev

Python version

3.9

Node version

16

Browser

Chrome

Additional context

No response

Checklist

  • I have searched Superset docs and Slack and didn't find a solution to my problem.
  • I have searched the GitHub issue tracker and didn't find a similar bug report.
  • I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section.
@dosubot dosubot bot added the sqllab Namespace | Anything related to the SQL Lab label Dec 6, 2024
Copy link

dosubot bot commented Dec 6, 2024

Superset's SQL parser handles special characters like '/' in database names or table names by escaping them correctly. The Table class in the parser converts names with special characters into a URL-encoded format. For example, a table name "table.name" with a schema "schema/name" and a catalog "catalog\nname" would be converted to "catalog%0Aname.schema%2Fname.table%2Ename" [1].

In your case, the parsing error might be due to the way the prefix is being handled. You might need to ensure that the prefix and database name are correctly formatted or escaped according to Superset's parsing rules. If the issue persists, it could be related to how the YDB engine is configured to handle such cases. The YDBEngineSpec class in Superset includes specific configurations for YDB, which might need to be adjusted to accommodate database names with prefixes [2].

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sqllab Namespace | Anything related to the SQL Lab
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant