This guide provides instructions for using dbt to manage real-time data transformations in RisingWave.
risingwave
shows up under plugins.
risingwave
), and specify other database configurations such as hostname, port, user name, etc.
The default database configurations are:
Materializations | Notes |
---|---|
table | This materialization creates a table. To use this materialization, add {{ config(materialized='table') }} to your model SQL files. |
view | Create a view. To use this materialization, add {{ config(materialized='view') }} to your model SQL files. |
ephemeral | This materialization uses common table expressions in RisingWave under the hood. To use this materialization, add {{ config(materialized='ephemeral') }} to your model SQL files. |
materializedview | To be deprecated. It is available only for backward compatibility purposes. Use materialized_view instead. |
materialized_view | Creates a materialized view. This materialization corresponds the incremental one in dbt. To use this materialization, add {{ config(materialized='materialized_view') }} to your model SQL files. |
incremental | Use materialized_view instead. Since RisingWave is designed to use materialized view to manage data transformation in an incremental way, you can just use the materialized_view materilization. |
source | Defines a source. To use this materialization, add {{ config(materialized='source') }} to your model SQL files. You need to provide your create source statement as a whole in this model. See Example model files for details. |
table_with_connector | Defines a table with connector settings. A table with connector settings is similar to a source. The difference is that a table object with connector settings persists raw streaming data in the source, while a source object does not. To use this materialization, add {{ config(materialized='table\_with\_connector') }} to your model SQL files. You need to provide your create table with connector statement as a whole in this model (see Example model files for details). Because dbt table has its own semantics, RisingWave use table_with_connector to distinguish itself from a dbt table. |
sink | Defines a sink. To use this materialization, add {{ config(materialized='sink') }} to your SQL files. You need to provide your create sink statement as a whole in this model. See Example model files for details. |
dbt debug
to check your connection to RisingWave.
~/.dbt/profiles.yml
to ensure your connection configurations are valid.
Run the following command to run your models.