Skip to main content

CrateDB setup

  • Maintained by: Crate.io, Inc.
  • Authors: CrateDB maintainers
  • GitHub repo: crate/dbt-cratedb2
  • PyPI package: dbt-cratedb2
  • Slack channel: Community Forum
  • Supported dbt Core version: v1.0.0 and newer
  • dbt Cloud support: Supported
  • Minimum data platform version: n/a

Installing dbt-cratedb2

Use pip to install the adapter. Before 1.8, installing the adapter would automatically install dbt-core and any additional dependencies. Beginning in 1.8, installing an adapter does not automatically install dbt-core. This is because adapters and dbt Core versions have been decoupled from each other so we no longer want to overwrite existing dbt-core installations. Use the following command for installation:

Configuring dbt-cratedb2

For CrateDB-specific configuration, please refer to CrateDB configs.

CrateDB is compatible with PostgreSQL, so its dbt adapter strongly depends on dbt-postgres, documented at Postgres profile setup.

CrateDB targets are configured exactly the same way, with just a few things to consider which are special to CrateDB. Relevant details are outlined at using dbt with CrateDB, which also includes up-to-date information.

Profile Configuration

CrateDB targets should be set up using a configuration like this minimal sample of settings in your profiles.yml file.

~/.dbt/profiles.yml
cratedb_analytics:
target: dev
outputs:
dev:
type: cratedb
host: [clustername].aks1.westeurope.azure.cratedb.net
port: 5432
user: [username]
pass: [password]
dbname: crate # CrateDB's only catalog is `crate`.
schema: doc # Define schema. `doc` is the default.
search_path: doc # Use the same value like `schema` by default.
0