apache/seatunnel · error · HiveConnectorException

CONFIG_VALIDATION_FAILED

CONFIG_VALIDATION_FAILED

Error message

Partitions list is empty, please check

What it means

HiveSourceConfig.validatePartitions requires a non-empty partition list when partition pruning is applied. If the configured partition expressions match no actual partitions in the table, the validation throws CONFIG_VALIDATION_FAILED with this message.

Source

Thrown at seatunnel-connectors-v2/connector-hive/src/main/java/org/apache/seatunnel/connectors/seatunnel/hive/source/config/HiveSourceConfig.java:118

            throw new HiveConnectorException(
                    HiveConnectorErrorCode.GET_HIVE_TABLE_INFORMATION_FAILED,
                    "Failed to get Hive table information for table_name='"
                            + tableName
                            + "'. Please ensure metastore is reachable and the table exists.",
                    e);
        }
        this.hadoopConf = parseHiveHadoopConfig(readonlyConfig, table);
        this.fileFormat = HiveTableUtils.parseFileFormat(table);
        this.readStrategy = parseReadStrategy(table, readonlyConfig, fileFormat, hadoopConf);
        this.filePaths = parseFilePaths(table, readStrategy);
        this.catalogTable =
                parseCatalogTable(
                        readonlyConfig, readStrategy, fileFormat, hadoopConf, filePaths, table);
    }

    private void validatePartitions(List<String> partitionsList) {
        if (CollectionUtils.isEmpty(partitionsList)) {
            throw new HiveConnectorException(
                    SeaTunnelAPIErrorCode.CONFIG_VALIDATION_FAILED,
                    "Partitions list is empty, please check");
        }
        int depth = partitionsList.get(0).replaceAll("\\\\", "/").split("/").length;
        long count =
                partitionsList.stream()
                        .map(partition -> partition.replaceAll("\\\\", "/").split("/").length)
                        .filter(length -> length != depth)
                        .count();
        if (count > 0) {
            throw new HiveConnectorException(
                    SeaTunnelAPIErrorCode.CONFIG_VALIDATION_FAILED,
                    "Every partition that in partition list should has the same directory depth");
        }
    }

    private ReadStrategy parseReadStrategy(
            Table table,

View on GitHub (pinned to cf67b549a7)

Solutions

  1. Run `SHOW PARTITIONS <table>` and confirm the values you filter on actually exist
  2. Verify the configured partition columns match the table's real partition keys (exact names/order)
  3. Remove or correct the partition filter if the table is unpartitioned
  4. Check path separators: partitions are validated by directory depth, so paths must be consistent

Example fix

// before
partition_column = ["dt"]
read_partitions = ["dt=2099-01-01"]   // does not exist -> empty list
// after (verified via SHOW PARTITIONS)
read_partitions = ["dt=2024-06-01", "dt=2024-06-02"]
Defensive patterns

Strategy: validation

Validate before calling

// Before submitting, confirm the partitions exist:
// beeline> SHOW PARTITIONS db.table;  and compare against read_partitions / filters
List<String> parts = fetchShowPartitions("db.table");
if (configuredPartitions.stream().noneMatch(parts::contains))
    throw new IllegalArgumentException("no matching partitions for filter");

Try / catch

try {
    HiveSourceConfig cfg = new HiveSourceConfig(pluginConfig);
} catch (HiveConnectorException e) {
    if (e.getCode().equals(SeaTunnelAPIErrorCode.CONFIG_VALIDATION_FAILED)) {
        // drop the partition filter or correct partition values
    }
    throw e;
}

Prevention

When it happens

Trigger: Setting partition column filters/read partitions whose combined values resolve to an empty List<String> of partition directories before the source reads.

Common situations: Filtering on a partition value that doesn't exist (e.g. date=2024-13-01); filtering on a column that is not actually a partition key; case mismatch in partition column names; table has no partitions at all but a partition filter was configured.

Understand the failure class

Background: EmptyResultError / "no results found": when an API or scraper succeeds but returns zero rows — this error's family across 9 libraries.

Related errors


AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10). Data as JSON: /api/errors/f59f8232b12b5fe1. Report an issue: GitHub.