Use dbt to manage nexmark queries in RisingWave!
This is a self-contained playground dbt project for RisingWave and we assume you have already depolyed RisingWave successfully in your environment.
models
└── example
├── dbt_packages
├── nexmark_query (define materialized_views, which is an alternative of the incremental model in risingwave)
├── sink (define sinks in risingwave dbt)
├── source (define sources in risingwave dbt)
├── table(define tables with indexes in risingwave dbt)
├── table_with_connector (define a table with connector in risingwave dbt)
└── view (define views in risingwave dbt)
-
Install dbt-risingwave adapter https://github.com/risingwavelabs/dbt-risingwave
-
Clone this repo.
-
Change into the
dbt_rw_nexmark
directory.
$ cd dbt_rw_nexmark
- Set up a profile called
dbt_rw_nexmark
to connect to RisingWave by following dbt instructions
The profile should look like this.
dbt_rw_nexmark:
outputs:
dev:
dbname: dev
host: localhost
password: '123456'
port: 4566
schema: public
threads: 1
type: risingwave
user: root
target: dev
- Ensure your profile is setup correctly
$ dbt debug
- Run the models:
$ dbt run
- Test the output of the models:
$ dbt test
- Generate documentation for the project:
$ dbt docs generate
- View the documentation for the project:
$ dbt docs serve
- Learn more about dbt in the docs
- Check out Discourse for commonly asked questions and answers