DuckDB
DuckDB database files: the duckdb source, from the duckdb package. Declare the package once in dependencies.yml; DRE installs it on demand:
plugins: - duckdbProfile fields
Section titled “Profile fields”Set in profiles.yml, under connections:, in a target with type: duckdb.
| Field | Default | Notes |
|---|---|---|
path |
:memory: |
DuckDB database file (relative to the project), or :memory:. |
threads |
Number of threads DuckDB may use. | |
memory_limit |
DuckDB memory limit, e.g. 4GB. |
| Field | Notes |
|---|---|
path |
Database file, relative to the project directory. Default :memory:. |
threads, memory_limit |
Passed to DuckDB. |
Capabilities: sessions, read_only, check (via EXPLAIN).
Run without a database server
Section titled “Run without a database server”Use DuckDB for local examples, SQL over files and reproducible report tests. A memory database exists for one connection session; use a file path for tables that must survive runs.
connections: warehouse: targets: dev: {type: duckdb, path: ":memory:"}name: local_reportsdefault_profile: warehouse-- reports/check/check.sqlselect 'local' as environment, 42 as row_count# reports/check/check.yml; also declare csv in dependencies.ymlqueries: [check]output: {format: csv}dre run check --preview 5 writes a local sample. The complete
tutorial project includes dependencies and every file.
For a real file-backed report, set path: reporting.duckdb relative to the project root.
threads controls DuckDB work as well as Binding concurrency; memory_limit: 1GB bounds
DuckDB’s memory, not the xlsx writer’s memory.
connection-failed can mean another process holds the database file; close its writer and retry.
query-failed on a missing table in :memory: means this session has not created or loaded it.
Put setup SQL before the result query, using tab: false. See connections,
report keys, error codes, and
source plugin.