apache/seatunnel · error · ClickhouseConnectorException
SEA-TUNNEL-API-01
SEA-TUNNEL-API-01
Error message
PluginName: %s, PluginType: %s, Message: %s
What it means
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.
Source
Thrown at seatunnel-connectors-v2/connector-clickhouse/src/main/java/org/apache/seatunnel/connectors/seatunnel/clickhouse/source/ClickhouseSourceFactory.java:213
.tablePath(tablePath)
.clickhouseTable(clickhouseTable)
.originQuery(sql)
.filterQuery(tableConfig.getFilterQuery())
.splitSize(tableConfig.getSplitSize())
.batchSize(tableConfig.getBatchSize())
.partitionList(tableConfig.getPartitionList())
.isSqlStrategyRead(tableConfig.isSqlStrategyRead())
.isComplexSql(isComplexSql)
.catalogTable(catalogTable)
.build();
clickhouseSourceTables.put(tablePath, clickhouseSourceTable);
// The database may be different for each tableConfig
// so create a separate nodes for each tablePath
nodesMap.put(tablePath, nodes);
} catch (ClickHouseException e) {
throw new ClickhouseConnectorException(
SeaTunnelAPIErrorCode.CONFIG_VALIDATION_FAILED,
String.format(
"PluginName: %s, PluginType: %s, Message: %s",
factoryIdentifier(), PluginType.SOURCE, e.getMessage()));
}
}
return () ->
(SeaTunnelSource<T, SplitT, StateT>)
new ClickhouseSource(
nodesMap, clickhouseSourceTables, clickhouseSourceConfig);
}
private String modifySQLToLimit1(String sql) {
return String.format("SELECT * FROM (%s) s LIMIT 1", sql);
}
private String generateQuerySql(String sql, String database, String table) {View on GitHub (pinned to cf67b549a7)
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
Example fix
// before
schema = {
table = "default.non_existent_table"
}
// after: use an existing table
schema = {
table = "default.events"
} Defensive patterns
Strategy: validation
Validate before calling
# validate table access before submitting the job
clickhouse-client --host "$HOST" --user "$USER" --password "$PASSWORD" \
--query "EXISTS TABLE ${DATABASE}.${TABLE}"
clickhouse-client ... --query "SELECT 1 FROM ${DATABASE}.${TABLE} LIMIT 1" # tests grants too Try / catch
try {
Source<?, ?, ?> source = factory.createSource(config);
} catch (ClickhouseConnectorException e) {
if (e.getErrorCode() == SeaTunnelAPIErrorCode.CONFIG_VALIDATION_FAILED) {
// parse the inner driver message after 'Message: ' for the real ClickHouse error
log.error("ClickHouse rejected the source table config: {}", e.getMessage());
}
throw e;
} Prevention
- 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
When it happens
Trigger: 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.
Common situations: 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.
Understand the failure class
Background: Schema validation failed / invalid input schema: payload rejected because its shape doesn't match the expected schema — this error's family across 28 libraries.
Related errors
- CLICKHOUSE_GET_TABLE_LIST_CONFIG_ERROR
- COMMON_ILLEGAL_ARGUMENT
- CLICKHOUSE_SHARD_KEY_NOT_FOUND
- SEA-TUNNEL-API-01
- unsupported clickhouse file copy method:" + type
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/ab668a3c7422ff9b.
Report an issue: GitHub.