Connecting DuckDB to S3, dbt, and BI Tools

Query S3 and cloud object storage directly from DuckDB with httpfs, wire it up as a dbt adapter, connect BI tools over JDBC/ODBC, and understand MotherDuck's hosted model.

Connecting DuckDB to Cloud Storage, dbt & BI Tools

DuckDB’s extension system lets it reach far beyond the local filesystem — object storage, external databases, and downstream BI tools all plug in through a small, focused set of extensions.


Querying S3 / GCS / Azure Blob with httpfs

INSTALL httpfs;
LOAD httpfs;
SET s3_region = 'us-east-1';
SET s3_access_key_id = '...';
SET s3_secret_access_key = '...';
SELECT * FROM read_parquet('s3://my-bucket/sales/2026/*.parquet');

Object storage credentials can also come from the standard AWS credential chain (env vars, ~/.aws/credentials, IAM role) via CREATE SECRET, which is the recommended approach over hardcoding keys in SQL:

CREATE SECRET (
TYPE s3,
PROVIDER credential_chain
);

The same httpfs extension handles plain HTTPS URLs, Google Cloud Storage (gs://), and Azure Blob Storage (azure://) with the equivalent SET variables for each provider.


dbt via dbt-duckdb

DuckDB is a first-class dbt adapter through the community-maintained dbt-duckdb package, which makes it a popular choice for local dbt development and small-scale production dbt projects without standing up a warehouse:

Terminal window
pip install dbt-duckdb
profiles.yml
my_project:
target: dev
outputs:
dev:
type: duckdb
path: 'dev.duckdb'
extensions:
- httpfs

From there, dbt run behaves exactly as it does against Snowflake or BigQuery — models, tests, and docs all work unchanged, just against a local (or S3-backed) DuckDB file instead.


BI Tools over JDBC / ODBC

DuckDB ships official JDBC and ODBC drivers, so tools like DBeaver, Tableau, and Power BI can connect to a .duckdb file the same way they’d connect to any other SQL database — point the driver at the file path, no server address needed.


MotherDuck: Hosted DuckDB

For teams that want DuckDB’s engine with a shared, always-on, multi-user service (collaborative access, cloud storage of the database file, hybrid local/cloud query execution), MotherDuck — founded by DuckDB’s creators — layers that on top of the open-source engine. Queries still speak the same DuckDB SQL dialect; MotherDuck just adds the “always running, shared with my team” pieces that a purely embedded database doesn’t provide on its own.