Skip to main content

Doris/SelectDB configurations

Models

TypeSupported?Details
view materializationYESCreates a view.
table materializationYESCreates a table.
incremental materializationYESCreates a table if it doesn't exist, and then item table model must be 'unique'.

View Materialization

A dbt model can be created as a Doris view and configured using the following syntax:

dbt_project.yml
models:
<resource-path>:
+materialized: view

Table Materialization

A dbt model can be created as a Doris table and configured using the following syntax:

dbt_project.yml
models:
<resource-path>:
+materialized: table
+duplicate_key: [ <column-name>, ... ],
+partition_by: [ <column-name>, ... ],
+partition_type: <engine-type>,
+partition_by_init: [<pertition-init>, ... ]
+distributed_by: [ <column-name>, ... ],
+buckets: int,
+properties: {<key>:<value>,...}

Table Configuration

OptionDescriptionRequired?
materializedHow the model will be materialized into Doris. Must be table to create a table model.Required
duplicate_keyThe key list of Doris table model :'duplicate'.Required
partition_byThe partition key list of Doris. (Doris partition)Optional
partition_typeThe partition type of Doris.Optional (default: RANGE)
partition_by_initThe partition rule or some real partitions item.Optional
distributed_byThe bucket key list of Doris. (Doris distribute)Required
bucketsThe bucket number in one Doris partition.Required
propertiesThe other configuration of Doris. (Doris properties)Required

Incremental Materialization

An incremental Doris table, item table model must be 'unique' and is configured using the following syntax:

dbt_project.yml
models:
<resource-path>:
+materialized: incremental
+unique_key: [ <column-name>, ... ],
+partition_by: [ <column-name>, ... ],
+partition_type: <engine-type>,
+partition_by_init: [<pertition-init>, ... ]
+distributed_by: [ <column-name>, ... ],
+buckets: int,
+properties: {<key>:<value>,...}

Incremental Table Configuration

OptionDescriptionRequired?
materializedHow the model will be materialized into Doris. Must be table to create a table model.Required
unique_keyThe key list of Doris table model :'Doris unique'.Required
partition_byThe partition key list of Doris. (Doris partition)Optional
partition_typeThe partition type of Doris.Optional (default: RANGE)
partition_by_initThe partition rule or some real partitions item.Optional
distributed_byThe bucket key list of Doris. (Doris distribute)Required
bucketsThe bucket number in one Doris partition.Required
propertiesThe other configuration of Doris. (Doris properties)Required
0