跳到主要内容
版本:Next

GoogleBigtable

Google Bigtable Sink 连接器

描述

使用原生 Bigtable Data v2 Java 客户端将数据写入 Google Cloud Bigtable。

主要特性

参数

参数名类型是否必填默认值
project_idstring-
instance_idstring-
tablestring-
rowkey_columnlist-
column_familyconfig-
credentials_pathstring-
rowkey_delimiterstring""
version_columnstring-
null_modestringskip
batch_mutation_sizeint100
common-options-

project_id [string]

Google Cloud 项目 ID,例如 "my-gcp-project"

instance_id [string]

Bigtable 实例 ID,例如 "my-bigtable-instance"

table [string]

写入的 Bigtable 表名,例如 "my-table"

rowkey_column [list]

用于构造行键的列名列表,例如 ["id"]["tenant_id", "event_id"]。多列时用 rowkey_delimiter 拼接。

column_family [config]

列名到列族的映射配置。可使用 all_columns 作为默认列族:

column_family {
all_columns = "cf"
}

也可以为不同列指定不同列族:

column_family {
name = "info"
age = "stats"
}

credentials_path [string]

Google Cloud 服务账号 JSON 密钥文件路径。未设置时使用应用默认凭证(ADC)。

rowkey_delimiter [string]

多列行键的拼接分隔符,默认为空字符串 ""

version_column [string]

用作 Bigtable Cell 时间戳(微秒)的 BIGINT 列名。未设置时使用当前系统时间。

null_mode [string]

空值写入策略:skip(默认,跳过该 Cell)或 empty(写入空字节数组)。

batch_mutation_size [int]

每次批量提交的行数,默认 100

示例

sink {
GoogleBigtable {
project_id = "my-gcp-project"
instance_id = "my-bigtable-instance"
table = "events"
rowkey_column = ["event_id"]
column_family {
all_columns = "cf"
}
}
}

Changelog

Change Log
ChangeCommitVersion
[Feature][Connector-V2] Add Google Cloud Bigtable Source and Sink connectorhttps://github.com/apache/seatunnel/commit/8e57c04dev