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;
SELECT * FROM my_db.ex.sample_data;
```
Returns another error: `superset error: near ".": syntax 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 [email protected].
To unsubscribe, please send an email to:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]