in seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/service/impl/JobTaskServiceImpl.java [488:538]
private void transformOptionCheck(String connectorType, String transformOptionsStr)
throws IOException {
Transform transform = Transform.valueOf(connectorType.toUpperCase());
switch (transform) {
case FIELDMAPPER:
FieldMapperTransformOptions fieldMapperTransformOptions =
getTransformOption(transform, transformOptionsStr);
if (fieldMapperTransformOptions != null) {
List<RenameField> renameFields = fieldMapperTransformOptions.getRenameFields();
checkTransformTargetFieldRepeat(
renameFields.stream()
.map(RenameField::getTargetName)
.collect(Collectors.toList()));
}
break;
case MULTIFIELDSPLIT:
SplitTransformOptions splitTransformOptions =
getTransformOption(transform, transformOptionsStr);
if (splitTransformOptions != null) {
List<String> fields =
splitTransformOptions.getSplits().stream()
.flatMap(split -> split.getOutputFields().stream())
.collect(Collectors.toList());
checkTransformTargetFieldRepeat(fields);
}
break;
case COPY:
CopyTransformOptions copyTransformOptions =
getTransformOption(transform, transformOptionsStr);
if (copyTransformOptions != null) {
List<String> fields =
copyTransformOptions.getCopyList().stream()
.map(Copy::getTargetFieldName)
.collect(Collectors.toList());
checkTransformTargetFieldRepeat(fields);
}
break;
case SQL:
SQLTransformOptions sqlTransformOptions =
getTransformOption(transform, transformOptionsStr);
if (sqlTransformOptions != null) {
// TODO The call interface returns the target field
List<String> fields = new ArrayList<>();
checkTransformTargetFieldRepeat(fields);
}
break;
case FILTERROWKIND:
case REPLACE:
default:
}
}