Open noppaz opened 2 years ago
Hi! Proper support for multiple databases landed in DuckDB 0.7 (https://duckdb.org/2023/02/13/announcing-duckdb-070.html#multi-database-support) and that would make implement this more trivial (and potentially make .open
obsolete altogether).
In paricular ATTACH 'someDatabase.duckdb'
is the SQL version of .open, and can also be chained with USE 'someDatabase.duckdb
, and I just tested that works with live https://shell.duckdb.org.
This can stay open until we figure out this properly, but a workaround / a better workflow it's already present.
Hi! Proper support for multiple databases landed in DuckDB 0.7 (https://duckdb.org/2023/02/13/announcing-duckdb-070.html#multi-database-support) and that would make implement this more trivial (and potentially make
.open
obsolete altogether).In paricular
ATTACH 'someDatabase.duckdb'
is the SQL version of .open, and can also be chained withUSE 'someDatabase.duckdb
, and I just tested that works with live https://shell.duckdb.org.This can stay open until we figure out this properly, but a workaround / a better workflow it's already present.
Hi @carlopi, when attach a xxx.db file, the console print out warning message "Buffering missing file: xxx.db.wal", just wondering how to disable this warning? Everything is running fine, .db.wal was also created when checked by using ".files list" command. The warning message is just bit annoying...
Trying to query tables from a duckdb file database isn't possible in the Web Shell as the
.open
command doesn't actually connect to it.Steps:
.files add
.open file.duckdb
Connected to a local transient in-memory database.
changes toConnected to a read-only remote database at: file.duckdb.
Expected tables are still not there to query. This can be verified by checking 0 rows returned from
PRAGMA show_tables;
. If we checkPRAGMA database_list;
the result implies it still uses the in memory database:As a bonus remark; I also noticed that it's possible to open any filename with the open command. For example, running
.open doesnt-exist.duckdb
will change the connection text toConnected to a read-only remote database at: doesnt-exist.duckdb.