dbt
dbt-starrocks 允许使用 dbt 在 StarRocks 中使用 dbt 的建模模式和最佳实践来转换数据。
dbt-starrocks GitHub repo.
Experimental feature
支持的功能
| StarRocks >= 3.1 | StarRocks >= 3.4 | 功能 |
|---|---|---|
| ✅ | ✅ | 表物化 |
| ✅ | ✅ | 视图物化 |
| ✅ | ✅ | 物化视图物化 |
| ✅ | ✅ | 增量物化 |
| ✅ | ✅ | 主键模型 |
| ✅ | ✅ | 源 |
| ✅ | ✅ | 自定义数据测试 |
| ✅ | ✅ | 文档生成 |
| ✅ | ✅ | 表达式分区 |
| ❌ | ❌ | Kafka |
| ❌ | ✅ | 动态覆盖 |
* | ✅ | 提交任务 |
| ✅ | ✅ | 微批处理 (插入覆盖) |
| ❌ | ✅ | 微批处理 (动态覆盖) |
* 请验证您的版本是否支持 提交任务,参见 SUBMIT TASK
安装
使用 pip 安装 StarRocks DBT 适配器:
pip install dbt-starrocks
验证安装
通过检查版本来验证安装:
dbt --version
这应该在插件下列出 starrocks。
配置
配置文件
创建或更新 profiles.yml,添加 StarRocks 特定设置。
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