Skip to content

Commit

Permalink
[cdc-cli][cdc-composer] Use "source-table" and "sink-table" as keywor…
Browse files Browse the repository at this point in the history
…ds of route (#2825)
  • Loading branch information
PatrickRen authored Dec 6, 2023
1 parent c43ec5e commit f7dee46
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ public class YamlPipelineDefinitionParser implements PipelineDefinitionParser {
private static final String NAME_KEY = "name";

// Route keys
private static final String ROUTE_SOURCE_TABLE_KEY = "sourceTable";
private static final String ROUTE_SINK_TABLE_KEY = "sinkTable";
private static final String ROUTE_SOURCE_TABLE_KEY = "source-table";
private static final String ROUTE_SINK_TABLE_KEY = "sink-table";
private static final String ROUTE_DESCRIPTION_KEY = "description";

private final ObjectMapper mapper = new ObjectMapper(new YAMLFactory());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ sink:
auto-create-table: true

route:
- sourceTable: mydb.default.app_order_.*
sinkTable: odsdb.default.app_order
- source-table: mydb.default.app_order_.*
sink-table: odsdb.default.app_order
description: sync all sharding tables to one
- sourceTable: mydb.default.web_order
sinkTable: odsdb.default.ods_web_order
- source-table: mydb.default.web_order
sink-table: odsdb.default.ods_web_order
description: sync table to with given prefix ods_

transform:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ sink:
bootstrap-servers: localhost:9092

route:
- sourceTable: mydb.default.app_order_.*
sinkTable: odsdb.default.app_order
- source-table: mydb.default.app_order_.*
sink-table: odsdb.default.app_order

pipeline:
parallelism: 4
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
* <p>A router definition contains:
*
* <ul>
* <li>matcher: a regex pattern for matching input table IDs. Required for the definition.
* <li>replace: a string for replacing matched table IDs as output. Required for the definition.
* <li>sourceTable: a regex pattern for matching input table IDs. Required for the definition.
* <li>sinkTable: a string for replacing matched table IDs as output. Required for the definition.
* <li>description: description for the router. Optional for the definition.
* </ul>
*/
Expand Down Expand Up @@ -58,9 +58,9 @@ public Optional<String> getDescription() {
@Override
public String toString() {
return "RouteDef{"
+ "matcher="
+ "sourceTable="
+ sourceTable
+ ", replace="
+ ", sinkTable="
+ sinkTable
+ ", description='"
+ description
Expand Down

0 comments on commit f7dee46

Please sign in to comment.