-
Notifications
You must be signed in to change notification settings - Fork 14.6k
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
Dataset loses catalog when updating query #32429
Comments
Hey @scriptbotprime! I'm here to help you with any bugs, questions, or contributions. Let's tackle this together! To resolve the issue in Superset 4.1.1 where updating a dataset query connected to Trino DB results in the error "Error 400 Bad Request: Schema is set but catalog is not," you need to ensure that both the catalog and schema are specified in the connection URL. The error indicates that a schema is provided without a corresponding catalog, which is required by Trino. The from sqlalchemy.engine.url import make_url
from superset.db_engine_specs.trino import TrinoEngineSpec
# Example URL with only schema set
url = make_url("trino://user:pass@localhost:8080/system")
# Adjust the URL to include both catalog and schema
uri = TrinoEngineSpec.adjust_engine_params(
url,
{},
catalog="your_catalog", # Set your catalog here
schema="your_schema", # Set your schema here
)[0]
print(str(uri)) # This should print the adjusted URL with both catalog and schema Ensure that your connection URL in Superset is correctly configured to include both the catalog and schema. If you are setting these values dynamically, make sure they are passed correctly to 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 |
Can you check |
Same here (Schema is set but catalog is not) while changing the calculated column of a dataset. |
I'll take a look! Thanks for the report! |
I used the docker image: apache/superset:15cf066, created another dataset, created a chart on top of it and then changed the dataset. The catalog information was lost again. The error message is different and less informative:
P.S. |
Bug description
In Superset 4.1.1 I have a problems when updating the query of a dataset which is connected to Trino DB.
After the update the connected chart gives me this error message:
Error: error 400: b'Error 400 Bad Request: Schema is set but catalog is not'
When going back to the editing window I can see that the catalog and schema is missing:

My workaround is to update the catalog in the superset database:
This fixes the schema as well. Maybe because it is the only schema in this catalog.
Screenshots/recordings
No response
Superset version
4.1.1
Python version
I don't know
Node version
I don't know
Browser
Chrome
Additional context
No response
Checklist
The text was updated successfully, but these errors were encountered: