Starrocks setup
Overview of dbt-starrocks
- Maintained by: Starrocks
- Authors: Astralidea
- GitHub repo: StarRocks/dbt-starrocks
- PyPI package:
dbt-starrocks
- Slack channel: #db-starrocks
- Supported dbt Core version: v1.6.2 and newer
- dbt Cloud support: Not Supported
- Minimum data platform version: Starrocks 2.5
Installing dbt-starrocks
pip is the easiest way to install the adapter:
python -m pip install dbt-starrocks
Installing dbt-starrocks
will also install dbt-core
and any other dependencies.
Configuring dbt-starrocks
For Starrocks-specifc configuration please refer to Starrocks Configuration
For further info, refer to the GitHub repository: StarRocks/dbt-starrocks
Authentication Methods
User / Password Authentication
Starrocks can be configured using basic user/password authentication as shown below.
~/.dbt/profiles.yml
my-starrocks-db:
target: dev
outputs:
dev:
type: starrocks
host: localhost
port: 9030
schema: analytics
# User/password auth
username: your_starrocks_username
password: your_starrocks_password
Description of Profile Fields
Option | Description | Required? | Example |
---|---|---|---|
type | The specific adapter to use | Required | starrocks |
host | The hostname to connect to | Required | 192.168.100.28 |
port | The port to use | Required | 9030 |
schema | Specify the schema (database) to build models into | Required | analytics |
username | The username to use to connect to the server | Required | dbt_admin |
password | The password to use for authenticating to the server | Required | correct-horse-battery-staple |
version | Let Plugin try to go to a compatible starrocks version | Optional | 3.1.0 |
Supported features
Starrocks <= 2.5 | Starrocks 2.5 ~ 3.1 | Starrocks >= 3.1 | Feature |
---|---|---|---|
✅ | ✅ | ✅ | Table materialization |
✅ | ✅ | ✅ | View materialization |
❌ | ❌ | ✅ | Materialized View materialization |
❌ | ✅ | ✅ | Incremental materialization |
❌ | ✅ | ✅ | Primary Key Model |
✅ | ✅ | ✅ | Sources |
✅ | ✅ | ✅ | Custom data tests |
✅ | ✅ | ✅ | Docs generate |
❌ | ❌ | ❌ | Kafka |
Notice
- When StarRocks Version < 2.5,
Create table as
can only set engine='OLAP' and table_type='DUPLICATE' - When StarRocks Version >= 2.5,
Create table as
supports table_type='PRIMARY' - When StarRocks Version < 3.1 distributed_by is required
It is recommended to use the latest starrocks version and dbt-starrocks version for the best experience.
0