diff --git a/dolphinscheduler-task-plugin/dolphinscheduler-task-datax/src/main/java/org/apache/dolphinscheduler/plugin/task/datax/DataxTask.java b/dolphinscheduler-task-plugin/dolphinscheduler-task-datax/src/main/java/org/apache/dolphinscheduler/plugin/task/datax/DataxTask.java index dfa45ff5d2..5e82bb71f1 100644 --- a/dolphinscheduler-task-plugin/dolphinscheduler-task-datax/src/main/java/org/apache/dolphinscheduler/plugin/task/datax/DataxTask.java +++ b/dolphinscheduler-task-plugin/dolphinscheduler-task-datax/src/main/java/org/apache/dolphinscheduler/plugin/task/datax/DataxTask.java @@ -90,6 +90,11 @@ public class DataxTask extends AbstractTask { */ private static final String DATAX_PYTHON = "python2.7"; private static final Pattern PYTHON_PATH_PATTERN = Pattern.compile("/bin/python[\\d.]*$"); + + /** + * select all + */ + private static final String SELECT_ALL_CHARACTER = "*"; /** * datax path */ @@ -538,6 +543,11 @@ public class DataxTask extends AbstractTask { String.format("grammatical analysis sql column [ %s ] failed", item)); } + if (SELECT_ALL_CHARACTER.equals(item.toString())) { + log.info("sql contains *, grammatical analysis failed"); + return new String[0]; + } + if (columnName == null) { throw new RuntimeException( String.format("grammatical analysis sql column [ %s ] failed", item));