{"record":{"id":"ab668a3c7422ff9b","repo":"apache/seatunnel","slug":"sea-tunnel-api-01-ab668a","errorCode":"SEA-TUNNEL-API-01","errorMessage":"PluginName: %s, PluginType: %s, Message: %s","messagePattern":"PluginName: (.+?), PluginType: (.+?), Message: (.+?)","errorType":"validation","errorClass":"ClickhouseConnectorException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-clickhouse/src/main/java/org/apache/seatunnel/connectors/seatunnel/clickhouse/source/ClickhouseSourceFactory.java","lineNumber":213,"sourceCode":"                                .tablePath(tablePath)\n                                .clickhouseTable(clickhouseTable)\n                                .originQuery(sql)\n                                .filterQuery(tableConfig.getFilterQuery())\n                                .splitSize(tableConfig.getSplitSize())\n                                .batchSize(tableConfig.getBatchSize())\n                                .partitionList(tableConfig.getPartitionList())\n                                .isSqlStrategyRead(tableConfig.isSqlStrategyRead())\n                                .isComplexSql(isComplexSql)\n                                .catalogTable(catalogTable)\n                                .build();\n\n                clickhouseSourceTables.put(tablePath, clickhouseSourceTable);\n                // The database may be different for each tableConfig\n                // so create a separate nodes for each tablePath\n                nodesMap.put(tablePath, nodes);\n\n            } catch (ClickHouseException e) {\n                throw new ClickhouseConnectorException(\n                        SeaTunnelAPIErrorCode.CONFIG_VALIDATION_FAILED,\n                        String.format(\n                                \"PluginName: %s, PluginType: %s, Message: %s\",\n                                factoryIdentifier(), PluginType.SOURCE, e.getMessage()));\n            }\n        }\n\n        return () ->\n                (SeaTunnelSource<T, SplitT, StateT>)\n                        new ClickhouseSource(\n                                nodesMap, clickhouseSourceTables, clickhouseSourceConfig);\n    }\n\n    private String modifySQLToLimit1(String sql) {\n        return String.format(\"SELECT * FROM (%s) s LIMIT 1\", sql);\n    }\n\n    private String generateQuerySql(String sql, String database, String table) {","sourceCodeStart":195,"sourceCodeEnd":231,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-clickhouse/src/main/java/org/apache/seatunnel/connectors/seatunnel/clickhouse/source/ClickhouseSourceFactory.java#L195-L231","documentation":"ClickhouseSourceFactory.createSource() throws CONFIG_VALIDATION_FAILED (SEA-TUNNEL-API-01) wrapping a ClickHouseException raised while introspecting the configured table(s). It packages the ClickHouse driver error message into the standard plugin/pluginType/message format. Means the job config referenced a ClickHouse table that the server rejected or failed to query during source setup.","triggerScenarios":"During createSource (called via tableSource), a ClickHouseException is thrown by driver calls that read table metadata (e.g. DESCRIBE / system.tables query for each tablePath) — table missing, bad credentials, unreachable node, or malformed database/table name.","commonSituations":"Typo in database or table name in the config, user lacking privileges on the table, cluster/host list misconfigured, ClickHouse server down, or special characters in identifiers that the driver rejects.","solutions":["Read the inner 'Message' — it contains the actual ClickHouseException text identifying the real problem","Verify database.table names in the config exist on the server: SHOW TABLES FROM <db>","Test the configured username/password/URL with clickhouse-client using the same credentials","Check GRANTS for the configured user on the target tables","Verify the configured host:port list is reachable from the SeaTunnel worker"],"exampleFix":"// before\nschema = {\n  table = \"default.non_existent_table\"\n}\n// after: use an existing table\nschema = {\n  table = \"default.events\"\n}","handlingStrategy":"validation","validationCode":"# validate table access before submitting the job\nclickhouse-client --host \"$HOST\" --user \"$USER\" --password \"$PASSWORD\" \\\n  --query \"EXISTS TABLE ${DATABASE}.${TABLE}\"\nclickhouse-client ... --query \"SELECT 1 FROM ${DATABASE}.${TABLE} LIMIT 1\"  # tests grants too","typeGuard":null,"tryCatchPattern":"try {\n    Source<?, ?, ?> source = factory.createSource(config);\n} catch (ClickhouseConnectorException e) {\n    if (e.getErrorCode() == SeaTunnelAPIErrorCode.CONFIG_VALIDATION_FAILED) {\n        // parse the inner driver message after 'Message: ' for the real ClickHouse error\n        log.error(\"ClickHouse rejected the source table config: {}\", e.getMessage());\n    }\n    throw e;\n}","preventionTips":["Verify database.table names exist on the server before job submission","Grant the configured user SELECT (and metadata) privileges on the tables","Pre-flight the ClickHouse connection with clickhouse-client using identical credentials","Validate host:port reachability from SeaTunnel workers"],"tags":["config-validation","clickhouse","source","database"],"backgroundTag":"schema-validation-failed","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}