We are trying to connect Superset instance to an in-memory duckdb which will in turn attach to a Postgres Instance.
Trying to attach a postgres database to duckdb works but is not persisted.
Explaining with an example, running the below 2 queries together in SQL Lab works fine and produces the result
ATTACH 'dbname=<dbname> user=<user> host=localhost password='' port=xxxx' AS test_db (TYPE POSTGRES, READ_ONLY);
select * from test_db.public.test
However, if we execute one after the other, the second query gives an error
duckdb error: Binder Error: Catalog "test_db" does not exist!
How can we make this attach variable to persist across queries or is this an incorrect way of handling ?
The Database connection of duckdb uses an im-memory url
duckdb:///:memory:
Any help is appreciated.
Thank you