Skip to main content

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.

target: dev
type: starrocks
host: localhost
port: 9030
schema: analytics

# User/password auth
username: your_starrocks_username
password: your_starrocks_password

Description of Profile Fields

typeThe specific adapter to useRequiredstarrocks
hostThe hostname to connect toRequired192.168.100.28
portThe port to useRequired9030
schemaSpecify the schema (database) to build models intoRequiredanalytics
usernameThe username to use to connect to the serverRequireddbt_admin
passwordThe password to use for authenticating to the serverRequiredcorrect-horse-battery-staple
versionLet Plugin try to go to a compatible starrocks versionOptional3.1.0

Supported features

Starrocks <= 2.5Starrocks 2.5 ~ 3.1Starrocks >= 3.1Feature
Table materialization
View materialization
Materialized View materialization
Incremental materialization
Primary Key Model
Custom data tests
Docs generate


  1. When StarRocks Version < 2.5, Create table as can only set engine='OLAP' and table_type='DUPLICATE'
  2. When StarRocks Version >= 2.5, Create table as supports table_type='PRIMARY'
  3. 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.