Certain core functionality may vary. If you would like to report a bug, request a feature, or contribute, you can check out the linked repository and open an issue.
Overview of dbt-materialize
- Maintained by: Materialize Inc.
- Authors: Materialize team
- GitHub repo: MaterializeInc/materialize/blob/main/misc/dbt-materialize
- PyPI package:
- Slack channel: #db-materialize
- Supported dbt Core version: v0.18.1 and newer
- dbt Cloud support: Not Supported
- Minimum data platform version: v0.28.0
pip is the easiest way to install the adapter:
pip install dbt-materialize
dbt-materialize will also install
dbt-core and any other dependencies.
For Materialize-specifc configuration, please refer to Materialize Configuration.
For further info, refer to the GitHub repository: MaterializeInc/materialize/blob/main/misc/dbt-materialize
Connecting to Materialize
Once you have set up a Materialize account, adapt your
profiles.yml to connect to your instance using the following reference profile configuration:
cluster: [cluster] # default 'default'
schema: [dbt schema]
keepalives_idle: 0 # default: 0, indicating the system default
connect_timeout: 10 # default: 10 seconds
retries: 1 # default: 1, retry on error/timeout when opening connections
cluster: The default cluster is used to maintain materialized views or indexes. A
default cluster is pre-installed in every environment, but we recommend creating dedicated clusters to isolate the workloads in your dbt project (for example,
keepalives_idle: The number of seconds before sending a ping to keep the Materialize connection active. If you are encountering
SSL SYSCALL error: EOF detected, you may want to lower the keepalives_idle value to prevent the database from closing its connection.
To test the connection to Materialize, run:
If the output reads "All checks passed!", you’re good to go! Check the dbt and Materialize guide to learn more and get started.
Because Materialize is optimized for transformations on streaming data and the core of dbt is built around batch, the
dbt-materialize adapter implements a few custom materialization types:
|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.|
|NO||Use the |
Materialized views (
materializedview), views (
view) and sources (
source) may have a list of
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.