Comment on page
DuckDB
Connect & Ingest data from / to a DuckDB database
The following credentials keys are accepted:
instance
(required) -> The local file path of the database fileschema
(optional) -> The default schema to use.duckdb_version
(optional) -> The CLI version of DuckDB to use. You can also specify the env. variableDUCKDB_VERSION
.read_only
(optional) -> Whether to open the connection inreadonly
mode. Acceptstrue
orfalse
. Default isfalse
.interactive
(optional) -> Whether to communicate to the DuckDB CLI via interactive mode instead of reopening the connection each time. Acceptstrue
orfalse
. Default isfalse
.
Here are examples of setting a connection named
DUCKDB
. We must provide the type=duckdb
property:# for local files
$ sling conns set DUCKDB type=duckdb instance=/path/to/file.db
# Or use url (only for local files)
$ sling conns set DUCKDB url=duckdb:///path/to/file.db
export DUCKDB='duckdb:///path/to/file.db'
connections:
DUCKDB:
type: duckdb
instance: <instance>
schema: <schema>
duckdb_version: '<duckdb_version>'
If you would like to use a specific DuckDB version, you can specify this way:
export DUCKDB_VERSION='0.7.0'
If you are facing issues connecting, please reach out to us at [email protected] or open a Github Issue here.
If you have a
.duckdbrc
file, which runs commands whenever the DuckDB CLI is invoked, this may interfere with normal Sling operation. If you are facing weird issues and have this file, try again after deleting it.Last modified 28d ago