apache/seatunnel · error · ClickhouseConnectorException
GET_PART_ERROR
GET_PART_ERROR
Error message
Cannot get part name from system.parts
What it means
ClickhouseProxy.getPartList queries system.parts to enumerate data parts of a table (per shard) and wraps any ClickHouseException thrown by that query in GET_PART_ERROR. It means the metadata query against system.parts failed, so the reader cannot determine which parts to scan.
Solutions
- Confirm the table exists and the user can run `SELECT database, table, name FROM system.parts WHERE database='..' AND table='..'` in clickhouse-client.
- Check ClickHouse server availability and network connectivity from the SeaTunnel worker nodes.
- Grant the connector user access to system.parts (it is normally world-readable; a custom users.xml restriction may block it).
- Retry the job — transient ClickHouseException (timeouts) is surfaced here; add connection/read timeout tuning if it recurs.
Defensive patterns
Strategy: retry
Validate before calling
// ensure the metadata query works before split enumeration SELECT count(*) FROM system.parts WHERE database = 'db' AND table = 'tbl' AND active;
Try / catch
try {
proxy.getPartList(database, table, shard, ...);
} catch (ClickhouseConnectorException e) {
LOG.warn("system.parts query failed, retrying", e);
// bounded retry with backoff, then fail
} Prevention
- Verify the ClickHouse user can query system.parts for the target table.
- Keep ClickHouse connections healthy (timeouts, health checks) so enumeration doesn't hit dead nodes.
- Confirm database/table names resolve identically on all shards of a Distributed table.
When it happens
Trigger: Calling getPartList(database, table, ...) when the system.parts query fails: table doesn't exist, system.parts is filtered to zero-access for the user, or the server is unreachable during split enumeration.
Common situations: Reading from a replicated/distributed table where the configured database/table resolves differently per shard; the ClickHouse user lacks grants on system.parts; transient network failure to ClickHouse during job startup.
Understand the failure class
Background: Database query failed: Internal Server Error 500s wrapping SQL, Prisma, and connection failures — what to check first — this error's family across 16 libraries.
Related errors
- QUERY_DATA_ERROR
- array inject error, unsupported data type: " + type
- Cannot find password of shard " +…
- CLICKHOUSE_GET_TABLE_LIST_CONFIG_ERROR
- clickhouse local file not exists
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/3c663303cd943dda.
Report an issue: GitHub.
Appendix: source
Thrown at seatunnel-connectors-v2/connector-clickhouse/src/main/java/org/apache/seatunnel/connectors/seatunnel/clickhouse/util/ClickhouseProxy.java:471
if (partitionList != null && !partitionList.isEmpty()) {
StringJoiner joiner = new StringJoiner("', '", "('", "')");
partitionList.forEach(joiner::add);
sql += " and partition in " + joiner.toString();
}
sql += " group by name";
log.debug("get part sql: {}", sql);
try (ClickHouseResponse response = clickhouseRequest.query(sql).executeAndWait()) {
Iterable<ClickHouseRecord> records = response.records();
return StreamSupport.stream(records.spliterator(), false)
.map(r -> new ClickhousePart(r.getValue(0).asString(), database, table, shard))
.collect(Collectors.toList());
} catch (ClickHouseException e) {
throw new ClickhouseConnectorException(
ClickhouseConnectorErrorCode.GET_PART_ERROR,
"Cannot get part name from system.parts",
e);
}
}
public List<SeaTunnelRow> batchFetchRecords(
String sql, TablePath tablePath, SeaTunnelRowType seaTunnelRowType) {
List<SeaTunnelRow> seaTunnelRowList = new ArrayList<>();
log.debug("run query data sql: {}", sql);
try (ClickHouseResponse response = clickhouseRequest.query(sql).executeAndWait()) {
response.stream()
.forEach(
record -> {
SeaTunnelRow seaTunnelRow =
ClickhouseUtil.convertToSeaTunnelRow(
record, seaTunnelRowType, tablePath.getFullName());View on GitHub (pinned to cf67b549a7)