The Materialize adapter plugin for dbt (data build tool).
Project description
dbt-materialize
dbt adapter for Materialize.
For a complete step-by-step guide on how to use dbt and Materialize, check the documentation.
Installation
dbt-materialize
is available on PyPI. To install the latest version via pip
(optionally using a virtual environment),
run:
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
Requirements
dbt-materialize
requires Materialize v0.20.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: materialize
pass: [password]
dbname: [database]
schema: [name of your dbt schema]
Complete sample profiles (including for Materialize Cloud) can be found in sample_profiles.yml.
Supported Features
Materializations
Type | Supported? | Details |
---|---|---|
source |
YES | Creates a source. |
view |
YES | Creates a view. |
materializedview |
YES | Creates a materialized view. |
table |
YES | Creates a materialized view. (Actual table support pending #5266.) |
index |
YES | (Deprecated) Creates an index. Use the indexes config to create indexes on materializedview , view or source relations instead. |
sink |
YES | Creates a sink. |
ephemeral |
YES | Executes queries using CTEs. |
incremental |
NO | Use the materializedview materialization instead! dbt's incremental models are valuable because they only spend your time and money transforming your new data as it arrives. Luckily, this is exactly what Materialize's materialized views were built to do! Better yet, our materialized views will always return up-to-date results without manual or configured refreshes. For more information, check out our documentation. |
Additional macros
Macro | Purpose |
---|---|
mz_generate_name(identifier) |
Generates a fully-qualified name (including the database and schema) given an object name. |
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.
Seeds
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.
Hooks
Not tested.
Custom Schemas
Not tested.
Sources
Not tested.
Testing and Documentation
dbt docs
and dbt test
commands are supported.
Snapshots
Not supported. Support is not planned for the near term.
Contributors
A huge thank you to Josh Wills, who created the original version of this adapter.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file dbt-materialize-1.0.5.tar.gz
.
File metadata
- Download URL: dbt-materialize-1.0.5.tar.gz
- Upload date:
- Size: 11.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f928a7d4aa75a6a963caa97c0c51f7167d72f3f50746f83f6e091fda192eb7c1 |
|
MD5 | c5471a1586280e07cb3fd1c1572066c9 |
|
BLAKE2b-256 | 0c5a7683e585406d3ab54ae27484f3c4f7f6ddd809b4f1a6fd694ccf1f9b0fa7 |