This is an automated email from the ASF dual-hosted git repository.

zongwen pushed a commit to branch cdc-multiple-table
in repository https://gitbox.apache.org/repos/asf/incubator-seatunnel.git


The following commit(s) were added to refs/heads/cdc-multiple-table by this 
push:
     new 2a69fdd41 [hotfix][dag] Throws an exception when the configuration is 
wrong (#4206)
2a69fdd41 is described below

commit 2a69fdd41f7837f34164317ae6f049079085d155
Author: Zongwen Li <[email protected]>
AuthorDate: Fri Feb 24 14:37:41 2023 +0800

    [hotfix][dag] Throws an exception when the configuration is wrong (#4206)
---
 .../seatunnel/engine/core/parse/MultipleTableJobConfigParser.java      | 3 +++
 1 file changed, 3 insertions(+)

diff --git 
a/seatunnel-engine/seatunnel-engine-core/src/main/java/org/apache/seatunnel/engine/core/parse/MultipleTableJobConfigParser.java
 
b/seatunnel-engine/seatunnel-engine-core/src/main/java/org/apache/seatunnel/engine/core/parse/MultipleTableJobConfigParser.java
index 830b7e7ad..c164416e3 100644
--- 
a/seatunnel-engine/seatunnel-engine-core/src/main/java/org/apache/seatunnel/engine/core/parse/MultipleTableJobConfigParser.java
+++ 
b/seatunnel-engine/seatunnel-engine-core/src/main/java/org/apache/seatunnel/engine/core/parse/MultipleTableJobConfigParser.java
@@ -171,6 +171,9 @@ public class MultipleTableJobConfigParser {
 
     public void parserSource(Config sourceConfig, ClassLoader classLoader) {
         List<CatalogTable> catalogTables = 
CatalogTableUtil.getCatalogTables(sourceConfig, classLoader);
+        if (catalogTables.isEmpty()) {
+            throw new JobDefineCheckException("The source needs catalog table, 
please configure `catalog` or `schema` options.");
+        }
         ReadonlyConfig readonlyConfig = 
ReadonlyConfig.fromConfig(sourceConfig);
         String factoryId = getFactoryId(readonlyConfig);
         String tableId = 
readonlyConfig.getOptional(CommonOptions.RESULT_TABLE_NAME).orElse("default");

Reply via email to