The Materialize adapter plugin for dbt.
For a complete step-by-step guide on how to use dbt and Materialize, check the documentation.
dbt-materialize is available on PyPI. To install the latest version via
pip (optionally using a virtual environment),
python3 -m venv dbt-venv # create the virtual environment source dbt-venv/bin/activate # activate the virtual environment pip install dbt-materialize # install the adapter
dbt-materialize requires Materialize v0.28.0+.
Configuring your profile
To connect to a Materialize instance, use the reference profile configuration in your connection profile:
dbt-materialize: target: dev outputs: dev: type: materialize threads: 1 host: [host] port: [port] user: [firstname.lastname@example.org] pass: [password] dbname: [database] schema: [dbt schema] cluster: [cluster] # default 'default' sslmode: require keepalives_idle: 0 # default 0
Complete sample profiles can be found in sample_profiles.yml.
||YES||Creates a source.|
||YES||Creates a view.|
||YES||Creates a materialized view.|
||YES||Creates a materialized view. (Actual table support pending #5266.)|
||YES||Creates a sink.|
||YES||Executes queries using CTEs.|
Use the indexes option to define a list of indexes on
materialized view materializations. Each Materialize index can have the following components:
||One or more columns on which the index is defined. To create an index that uses all columns, use the
||The name for the index. If unspecified, Materialize will use the materialization name and column names provided.|
||The cluster to use to create the index. If unspecified, indexes will be created in the cluster used to create the materialization.|
We provide a
materialize-dbt-utils package with Materialize-specific implementations of dispatched macros from
dbt-utils. To use this package in your dbt project, check the latest installation instructions in dbt Hub.
dbt seed will create a
static materialized view from a CSV file. You will not be able to add to or
update this view after it has been created.
source freshness is not supported because using Materialize, your sources will always be fresh.
dbt docs is supported.
dbt test is supported.
If you set the optional
--store-failures flag or
store-failures config, dbt will save the results of a test query to a
These will be created in a schema suffixed or named
dbt_test__audit by default. Change this value by setting a
Not supported. Support is not planned for the near term.
A huge thank you to Josh Wills, who created the original version of this adapter.
Release history Release notifications | RSS feed
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.