arshadmohammad commented on code in PR #233:
URL: https://github.com/apache/seatunnel-web/pull/233#discussion_r1808526286
##########
seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/thirdparty/datasource/impl/Db2DataSourceConfigSwitcher.java:
##########
@@ -110,13 +110,15 @@ public Config mergeDatasourceConfig(
connectorConfig =
connectorConfig.withValue(QUERY_KEY,
ConfigValueFactory.fromAnyRef(sql));
} else if (pluginType.equals(PluginType.SINK)) {
-
- List<String> tableFields = selectTableFields.getTableFields();
-
- String sql = generateDb2(tableFields, databaseName, tableName);
-
- connectorConfig =
- connectorConfig.withValue(QUERY_KEY,
ConfigValueFactory.fromAnyRef(sql));
+ if (selectTableFields.isAll()) {
+ // Convert schema to SQL if all fields are present
+ // else use default generate_sink_sql=true
+ List<String> tableFields =
selectTableFields.getTableFields();
+ String sql = generateDb2(tableFields, databaseName,
tableName);
+ connectorConfig =
+ connectorConfig.withValue(
+ QUERY_KEY,
ConfigValueFactory.fromAnyRef(sql));
+ }
Review Comment:
can you attach snapshot or test cases for this change
--
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]