SelectDB(Doris)

SelectDB(Doris) 配置项

config 语法格式:

{{ config(
    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>",...}
      ...
    ]
) }}

在 Doris/SelectDB 上建模时,可使用的配置项如下:

配置项
描述
Required or not?

materialized

How the model will be materialized into Doris. Must be table to create a table model.

Required, can be defined in metadata

duplicate_key

The key list of Doris table model: 'duplicate'.

Required

partition_by

The partition key list of Doris.

Optional

partition_type

The partition type of Doris.

Optional (default: RANGE)

partition_by_init

The partition rule or some real partitions item.

Optional

distributed_by

The bucket key list of Doris.

Required

buckets

The bucket number in one Doris partition.

Required

properties

The other configuration of Doris.

Required

增量模型

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

Incremental table configuration

Available configurations:

Option
Description
Required or not?

materialized

How the model will be materialized into Doris. Must be table to create a table model.

Required

unique_key

The key list of Doris table model :'Doris unique'.

Required

partition_by

The partition key list of Doris. (Doris partition)

Optional

partition_type

The partition type of Doris.

Optional (default: RANGE)

partition_by_init

The partition rule or some real partitions item.

Optional

distributed_by

The bucket key list of Doris. (Doris distribute)

Required

buckets

The bucket number in one Doris partition.

Required

properties

The other configuration of Doris. (Doris properties)

Required

最佳实践

Here's a sample model using Doris for incrementally update by partition:

查看更多用法,可参考 Doris 官方文档

Last updated