-
Notifications
You must be signed in to change notification settings - Fork 14k
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 parse SQL (Dialects.TSQL) #31183
Comments
The issue you're encountering seems to be related to SQL parsing for the TSQL dialect in the The error message suggests that there might be a problem with how SQL statements are being parsed for users with specific permissions on the To address this issue, you might want to:
If the problem persists, consider testing with a simplified SQL query to isolate whether the issue is with specific SQL syntax or permission settings. |
@dosu How Can I handle this as before upgrade? |
To handle the issue as before the upgrade, you can try the following steps:
These steps should help you manage the issue while maintaining the necessary permissions and SQL functionality. |
I have workaround this, using the old |
@betodealmeida this might also use your help! 🙏 |
Right, we need to parse the query in order to determine which catalogs/schemas/tables are being accessed when the user doesn't have full access to the database. If the user has full access we just don't parse the query. In the past this was done using We're currently in the process of switching the parsing to For MSSQL we use the T-SQL dialect, which AFAIK is the correct one. If you can share the query that's causing problems (anonymized is fine) we can take a look, and file a ticket upstream with |
Assigned it to you temporarily, @Habeeb556, since we need the query to investigate this more. |
Bug description
After upgrade from
4.0.1
to4.1.1
I encountered an issue with permissionThis error occurred for users to whom I assigned specific permissions on the
dbo
schema only. When I changed the permissions to full access for the entire databaseid:
, the issue was resolved. I noticed that this problem only happens with themssql.py
engine, while the others (MySQL, PostgreSQL, and Oracle) are working fine.Log:
WARNING:superset.sql_parse:Unable to parse SQL (Dialects.TSQL): Template(body=[Output(nodes=[TemplateData(data='SELECT ...')])])
Screenshots/recordings
Superset version
master / latest-dev
Python version
3.11
Node version
I don't know
Browser
Not applicable
Additional context
No response
Checklist
The text was updated successfully, but these errors were encountered: