dbt-risingwave


Namedbt-risingwave JSON
Version 1.9.0 PyPI version JSON
download
home_pagehttps://github.com/risingwavelabs/dbt-risingwave
SummaryThe RisingWave adapter plugin for dbt
upload_time2024-12-11 09:28:51
maintainerNone
docs_urlNone
authorDylan Chen
requires_python>=3.9
licensehttp://www.apache.org/licenses/LICENSE-2.0
keywords dbt risingwave
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # dbt-risingwave

A [RisingWave](https://github.com/risingwavelabs/risingwave) 
adapter plugin for [dbt](https://www.getdbt.com/).

**RisingWave** is a cloud-native streaming database that uses SQL as the interface language. It is designed to reduce the complexity and cost of building real-time applications. https://www.risingwave.com

**dbt** enables data analysts and engineers to transform their data using the same practices that software engineers use to build applications. [Use dbt for data transformations in RisingWave](https://docs.risingwave.com/docs/current/use-dbt/)

## Getting started

The package has not been published to PyPI, please install it via git.

1. Install `dbt-risingwave`

```shell
python3 -m pip install dbt-risingwave
```

2. Get `RisingWave` running

Please follow [this](https://www.risingwave.dev/docs/current/get-started/) guide to setup a functional RisingWave instance.

3. Configure `dbt` profile file

The profile file is located in `~/.dbt/profiles.yml`. Here's an example of how to use it with RisingWave.

```yaml
default:
  outputs:
    dev:
      type: risingwave
      host: 127.0.0.1
      user: root
      pass: ""
      dbname: dev
      port: 4566
      schema: public
  target: dev
```

4. Run `dbt debug` to check whether configuration is correct.

## Models

The dbt models for managing data transformations in RisingWave is similar to typical dbt sql models. The main differences are the materializations. We customized the materializations to fit the data processing model of RisingWave.

| Materializations      | INFO                   |
| ---------------------- | --------------------- |
| materialized_view      | Create a materialized view. This materialization is corresponding to the incremental one in dbt. To use this materialization, add {{ config(materialized='materialized_view') }} to your model SQL files.                      |
| materializedview       | (Deprecated) only for backward compatibility, use `materialized_view` instead                      |
| 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.                      |
| table                  | Create 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. |
| incremental            | Use `materialized_view` instead if possible, since RisingWave is designed to use materialized view to manage data transformation in an incremental way. From v1.7.3, dbt-risingwave support `incremental` model to give users better control of when to update their model. This model will update table in a batch way incrementally.                     |
| source                 | Define a source {{ config(materialized='source') }}. You need to provide your create source statement as a whole in this model.                      |
| table_with_connector   | Define a table with a connector {{ config(materialized='table_with_connector') }}. You need to provide your create table with connector statement as a whole in this model. Because dbt `table` has its own semantics, RisingWave use `table_with_connector` to distinguish itself from it.                      |
| sink                   | Define a sink {{ config(materialized='sink') }}. You need to provide your create sink statement as a whole in this model.                      |

To learn how to use, you can check RisingWave offical example [dbt_rw_nexmark](https://github.com/risingwavelabs/dbt_rw_nexmark).

## DBT RUN behavior

- `dbt run`: only create new models (if not exists) without dropping any models.
- `dbt run --full-refresh`: drop models and create the new ones. This command can make sure your streaming pipelines are consistent with what you define in dbt models.

## Graph operators

[Graph operators](https://docs.getdbt.com/reference/node-selection/graph-operators) is useful when you want to only recreate a subset of your models.

```sh
dbt run --select "my_model+"         # select my_model and all children
dbt run --select "+my_model"         # select my_model and all parents
dbt run --select "+my_model+"         # select my_model, and all of its parents and children
```

## Tests

All items below have been tested against the the latest RisingWave daily build verison.

- [x] Offical example [jaffle_shop](https://github.com/dbt-labs/jaffle_shop) is tested.
- [x] RisingWave offical example [dbt_rw_nexmark](https://github.com/risingwavelabs/dbt_rw_nexmark) is tested.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/risingwavelabs/dbt-risingwave",
    "name": "dbt-risingwave",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": null,
    "keywords": "dbt RisingWave",
    "author": "Dylan Chen",
    "author_email": "zilin@risingwave-labs.com",
    "download_url": "https://files.pythonhosted.org/packages/98/3e/d6ba325bf6e760207f01b8dbe69eb026d8de7d5f9fc50bff87990976fb29/dbt_risingwave-1.9.0.tar.gz",
    "platform": null,
    "description": "# dbt-risingwave\n\nA [RisingWave](https://github.com/risingwavelabs/risingwave) \nadapter plugin for [dbt](https://www.getdbt.com/).\n\n**RisingWave** is a cloud-native streaming database that uses SQL as the interface language. It is designed to reduce the complexity and cost of building real-time applications. https://www.risingwave.com\n\n**dbt** enables data analysts and engineers to transform their data using the same practices that software engineers use to build applications. [Use dbt for data transformations in RisingWave](https://docs.risingwave.com/docs/current/use-dbt/)\n\n## Getting started\n\nThe package has not been published to PyPI, please install it via git.\n\n1. Install `dbt-risingwave`\n\n```shell\npython3 -m pip install dbt-risingwave\n```\n\n2. Get `RisingWave` running\n\nPlease follow [this](https://www.risingwave.dev/docs/current/get-started/) guide to setup a functional RisingWave instance.\n\n3. Configure `dbt` profile file\n\nThe profile file is located in `~/.dbt/profiles.yml`. Here's an example of how to use it with RisingWave.\n\n```yaml\ndefault:\n  outputs:\n    dev:\n      type: risingwave\n      host: 127.0.0.1\n      user: root\n      pass: \"\"\n      dbname: dev\n      port: 4566\n      schema: public\n  target: dev\n```\n\n4. Run `dbt debug` to check whether configuration is correct.\n\n## Models\n\nThe dbt models for managing data transformations in RisingWave is similar to typical dbt sql models. The main differences are the materializations. We customized the materializations to fit the data processing model of RisingWave.\n\n| Materializations      | INFO                   |\n| ---------------------- | --------------------- |\n| materialized_view      | Create a materialized view. This materialization is corresponding to the incremental one in dbt. To use this materialization, add {{ config(materialized='materialized_view') }} to your model SQL files.                      |\n| materializedview       | (Deprecated) only for backward compatibility, use `materialized_view` instead                      |\n| 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.                      |\n| table                  | Create a table. To use this materialization, add {{ config(materialized='table') }} to your model SQL files. |\n| view                   | Create a view. To use this materialization, add {{ config(materialized='view') }} to your model SQL files. |\n| incremental            | Use `materialized_view` instead if possible, since RisingWave is designed to use materialized view to manage data transformation in an incremental way. From v1.7.3, dbt-risingwave support `incremental` model to give users better control of when to update their model. This model will update table in a batch way incrementally.                     |\n| source                 | Define a source {{ config(materialized='source') }}. You need to provide your create source statement as a whole in this model.                      |\n| table_with_connector   | Define a table with a connector {{ config(materialized='table_with_connector') }}. You need to provide your create table with connector statement as a whole in this model. Because dbt `table` has its own semantics, RisingWave use `table_with_connector` to distinguish itself from it.                      |\n| sink                   | Define a sink {{ config(materialized='sink') }}. You need to provide your create sink statement as a whole in this model.                      |\n\nTo learn how to use, you can check RisingWave offical example [dbt_rw_nexmark](https://github.com/risingwavelabs/dbt_rw_nexmark).\n\n## DBT RUN behavior\n\n- `dbt run`: only create new models (if not exists) without dropping any models.\n- `dbt run --full-refresh`: drop models and create the new ones. This command can make sure your streaming pipelines are consistent with what you define in dbt models.\n\n## Graph operators\n\n[Graph operators](https://docs.getdbt.com/reference/node-selection/graph-operators) is useful when you want to only recreate a subset of your models.\n\n```sh\ndbt run --select \"my_model+\"         # select my_model and all children\ndbt run --select \"+my_model\"         # select my_model and all parents\ndbt run --select \"+my_model+\"         # select my_model, and all of its parents and children\n```\n\n## Tests\n\nAll items below have been tested against the the latest RisingWave daily build verison.\n\n- [x] Offical example [jaffle_shop](https://github.com/dbt-labs/jaffle_shop) is tested.\n- [x] RisingWave offical example [dbt_rw_nexmark](https://github.com/risingwavelabs/dbt_rw_nexmark) is tested.\n",
    "bugtrack_url": null,
    "license": "http://www.apache.org/licenses/LICENSE-2.0",
    "summary": "The RisingWave adapter plugin for dbt",
    "version": "1.9.0",
    "project_urls": {
        "Homepage": "https://github.com/risingwavelabs/dbt-risingwave"
    },
    "split_keywords": [
        "dbt",
        "risingwave"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3b49f99a6800890506a6db4cc26aeef4d5a80a1a83e7bd207f4383fe924e259d",
                "md5": "0894852d97dd5588656a165283afc382",
                "sha256": "73b7b8232f6f770e1e5d78ad444f0bd08e1e443418e84ff922ed297616c6b35d"
            },
            "downloads": -1,
            "filename": "dbt_risingwave-1.9.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "0894852d97dd5588656a165283afc382",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 22247,
            "upload_time": "2024-12-11T09:28:48",
            "upload_time_iso_8601": "2024-12-11T09:28:48.335699Z",
            "url": "https://files.pythonhosted.org/packages/3b/49/f99a6800890506a6db4cc26aeef4d5a80a1a83e7bd207f4383fe924e259d/dbt_risingwave-1.9.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "983ed6ba325bf6e760207f01b8dbe69eb026d8de7d5f9fc50bff87990976fb29",
                "md5": "86dcc711d9e1291c8b27b4977e9a5ed0",
                "sha256": "63efebc85c4f9fc75f426f33c2df378ec65bd584bb7ceeac000a79b1633f3892"
            },
            "downloads": -1,
            "filename": "dbt_risingwave-1.9.0.tar.gz",
            "has_sig": false,
            "md5_digest": "86dcc711d9e1291c8b27b4977e9a5ed0",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 18305,
            "upload_time": "2024-12-11T09:28:51",
            "upload_time_iso_8601": "2024-12-11T09:28:51.021214Z",
            "url": "https://files.pythonhosted.org/packages/98/3e/d6ba325bf6e760207f01b8dbe69eb026d8de7d5f9fc50bff87990976fb29/dbt_risingwave-1.9.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-12-11 09:28:51",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "risingwavelabs",
    "github_project": "dbt-risingwave",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "tox": true,
    "lcname": "dbt-risingwave"
}
        
Elapsed time: 3.94510s