GitHub user ampil edited a discussion: Meta DB (superset://) returns “no such table”
I recieve a `“no such table”` error when running a simple query from a “Superset meta database” connection: `SELECT * FROM "dev_my_db.ex.sample_data"; ` Logs show just this: ``` INFO:superset.commands.sql_lab.execute:Triggering query_id: 2197 INFO:superset.sqllab.sql_json_executer:Query 2197: Running query on a Celery worker ``` Steps I did: 1. Enabled the feature flag in the config: ``` DEFAULT_FEATURE_FLAGS = { ... "ENABLE_SUPERSET_META_DB": True, ... } ``` 2. Created a PostgreSQL connection to my database: - connection labeled as "dev_my_db" - database name: "my_db" 3. Created “Superset meta database” connection (SQLAlchemy URI: `superset://`) 4. Put my db into the "white list" in “Superset meta database”: Advanced → Other → ENGINE PARAMETERS: {"allowed_dbs":["dev_my_db"]} 5. Tested the query from "dev_my_db" connection: `SELECT * FROM ex.sample_data;` It works 6. Tried different queries from the meta db: ``` SELECT * FROM "dev_my_db.ex.sample_data"; SELECT * FROM "dev_my_db.ex%2Esample_data"; SELECT * FROM "dev_my_db%2Eex.sample_data"; SELECT * FROM "my_db.ex.sample_data"; SELECT * FROM "my_db.ex%2Esample_data"; SELECT * FROM "my_db%2Eex.sample_data"; ``` with updated settings: Advanced → Other → ENGINE PARAMETERS: {"allowed_dbs":["dev_my_db". "my_db"]} Still, "no such table" error. Execution without quotes as suggested here https://github.com/apache/superset/discussions/29562: ``` SELECT * FROM dev_my_db.ex.sample_data; ``` Returns another error: `superset error: near ".": syntax error` And execution without db name ``` SELECT * FROM my_db.ex.sample_data; ``` Returns `"no such table"` error. Followed the docs: https://superset.apache.org/docs/configuration/databases/#querying-across-databases Looked at successful examples: https://github.com/apache/superset/discussions/35173 https://github.com/apache/superset/discussions/34902 What am I doing wrong? Environment: * Superset: 4.1.1 * Superset DB: PostgreSQL * DB I want to query: PostgreSQL * Deployment: on Linux GitHub link: https://github.com/apache/superset/discussions/35278 ---- This is an automatically sent email for notifications@superset.apache.org. To unsubscribe, please send an email to: notifications-unsubscr...@superset.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org For additional commands, e-mail: notifications-h...@superset.apache.org