lvyanquan commented on code in PR #3871:
URL: https://github.com/apache/flink-cdc/pull/3871#discussion_r1919808077
##########
docs/content/docs/connectors/pipeline-connectors/doris.md:
##########
@@ -182,6 +182,25 @@ pipeline:
See more about <a
href="https://doris.apache.org/docs/dev/sql-manual/sql-statements/Data-Definition-Statements/Create/CREATE-TABLE/">
Doris Table Properties</a></td>
</td>
</tr>
+ <tr>
+ <td>table.create.auto-partition.properties.*</td>
+ <td>optional</td>
+ <td style="word-wrap: break-word;">(none)</td>
+ <td>String</td>
+ <td>Create the auto partition Properties configuration of the table.<br/>
+ Currently the partition function only supports date_trunc, and the
partition column supports only DATE or DATETIME types, and the version of Doris
must greater than 2.1.6. See more about <a
href="https://doris.apache.org/docs/table-design/data-partitioning/auto-partitioning">Doris
Auto Partitioning</a><br/>
+ These properties are supported now:<br/>
+ <code> table.create.auto-partition.properties.include</code>A
collection of tables after route to include, separated by commas, supports
regular expressions;<br/>
+ <code> table.create.auto-partition.properties.exclude</code>A
collection of tables after route to exclude, separated by commas, supports
regular expressions;<br/>
Review Comment:
It's better not to let user aware of the concept of `route`, which will make
it hard to understand.
##########
docs/content.zh/docs/connectors/pipeline-connectors/doris.md:
##########
@@ -182,6 +182,25 @@ pipeline:
查看更多关于 <a
href="https://doris.apache.org/zh-CN/docs/dev/sql-manual/sql-statements/Data-Definition-Statements/Create/CREATE-TABLE/">
Doris Table 的属性</a></td>
</td>
</tr>
+ <tr>
+ <td>table.create.auto-partition.properties.*</td>
+ <td>optional</td>
+ <td style="word-wrap: break-word;">(none)</td>
+ <td>String</td>
+ <td>创建自动分区表的配置。<br/>
+ 当前仅支持DATE/DATETIME类型列的AUTO RANGE
PARTITION,分区函数为<code>date_trunc</code>,且Doris版本必须大于2.1.6,查看更多关于 <a
href="https://doris.apache.org/docs/table-design/data-partitioning/auto-partitioning">Doris自动分区</a><br/>
+ 支持的属性有:<br/>
+ <code>
table.create.auto-partition.properties.include</code>包含的经过route后的表集合,用逗号分隔,支持正则表达式;<br/>
+ <code>
table.create.auto-partition.properties.exclude</code>排除的经过route后的表集合,用逗号分隔,支持正则表达式;<br/>
+ <code>
table.create.auto-partition.properties.default_partition_key</code>默认分区键;<br/>
+ <code>
table.create.auto-partition.properties.default_partition_unit</code>默认分区单位;<br/>
+ <code>
table.create.auto-partition.properties.DB.TABLE.partition_key</code>特定表的分区键,如未配置取默认分区键;<br/>
+ <code>
table.create.auto-partition.properties.DB.TABLE.partition_unit</code>特定表的分区单位,如未配置取默认分区单位。<br/>
Review Comment:
Could we add these properties though
[transform](https://nightlies.apache.org/flink/flink-cdc-docs-master/docs/core-concept/transform/#specify-table-creation-configuration)?
##########
flink-cdc-connect/flink-cdc-pipeline-connectors/flink-cdc-pipeline-connector-doris/src/main/java/org/apache/flink/cdc/connectors/doris/sink/DorisMetadataApplier.java:
##########
@@ -162,6 +164,10 @@ private void applyCreateTableEvent(CreateTableEvent event)
throws SchemaEvolveEx
DorisDataSinkOptions.getPropertiesByPrefix(
config, TABLE_CREATE_PROPERTIES_PREFIX);
tableSchema.setProperties(tableProperties);
+
+ Tuple2<String, String> partitionInfo =
+ DorisSchemaUtils.getPartitionInfo(config, schema, tableId);
+ tableSchema.setPartitionInfo(partitionInfo);
Review Comment:
What about add logs here to print the partitionInfo
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]