dbt
dbt-starrocks は、dbt を使用して StarRocks 内のデータを変換するためのツールで、dbt のモデリングパターンとベストプラクティスを活用できます。
dbt-starrocks GitHub repo.
Supported features
Supported features
| StarRocks >= 3.1 | StarRocks >= 3.4 | Feature |
|---|---|---|
| ✅ | ✅ | Table materialization |
| ✅ | ✅ | View materialization |
| ✅ | ✅ | Materialized View materialization |
| ✅ | ✅ | Incremental materialization |
| ✅ | ✅ | Primary Key Model |
| ✅ | ✅ | Sources |
| ✅ | ✅ | Custom data tests |
| ✅ | ✅ | Docs generate |
| ✅ | ✅ | Expression Partition |
| ❌ | ❌ | Kafka |
| ❌ | ✅ | Dynamic Overwrite |
* | ✅ | Submit task |
| ✅ | ✅ | Microbatch (Insert Overwrite) |
| ❌ | ✅ | Microbatch (Dynamic Overwrite) |
* 特定の submit task のサポートを確認するには、SUBMIT TASK を参照してください。
Installation
StarRocks DBT アダプターを pip を使用してインストールします。
pip install dbt-starrocks
Verify Installation
インストールを確認するには、バージョンをチェックします。
dbt --version
これにより、starrocks がプラグインとしてリストされるはずです。
Configuration
Profiles
StarRocks 固有の設定で profiles.yml を作成または更新します。
starrocks_project:
target: dev
outputs:
dev:
type: starrocks
host: your-starrocks-host.com
port: 9030
schema: your_database
username: your_username
password: your_password
catalog: test_catalog
Parameters
type
Description: 使用する特定のアダプターで、これは starrocks に設定する必要があります
Required?: 必須
Example: starrocks
host
Description: 接続するホスト名
Required?: 必須
Example: 192.168.100.28
port
Description: 使用するポート
Required?: 必須
Example: 9030
catalog
Description: モデルを構築するカタログを指定
Required?: 任意
Example: default_catalog
schema
Description: モデルを構築するスキーマ (StarRocks のデータベース) を指定
Required?: 必須
Example: analytics
username
Description: サーバーに接続するために使用するユーザー名
Required?: 必須
Example: dbt_admin
password
Description: サーバーへの認証に使用するパスワード
Required?: 必須
Example: correct-horse-battery-staple
version
Description: プラグインが互換性のある starrocks バージョンに移行しようとする
Required?: 任意
Example: 3.1.0