apache/seatunnel · error · OptionValidationException
tables_configs[ ]: 'keys' must be configured and non-blank
Error message
tables_configs[%d]: 'keys' must be configured and non-blank
What it means
Validation of the `tables_configs` option failed for at least one entry because its 'keys' field is absent, null, or blank. RedisTableConfigsValidator.evaluate() reads RedisBaseOptions.KEY_PATTERN from each entry and requires a non-empty, non-whitespace key pattern; without it the connector cannot know which Redis keys the table covers.
Solutions
- Add a non-blank `keys` value (a key pattern like "user:*") to every tables_configs entry.
- If the value is templated, ensure the placeholder resolves to a real pattern.
- Remove genuinely empty entries from tables_configs instead of leaving them with blank keys.
Example fix
// before
tables_configs = [{ data_type = "string" }]
// after
tables_configs = [{ keys = "user:*", data_type = "string" }] Defensive patterns
Strategy: validation
Validate before calling
for (Map<String,Object> cfg : tablesConfigs) {
Object keys = cfg.get("keys");
if (keys == null || keys.toString().trim().isEmpty())
throw new IllegalArgumentException("tables_configs entry missing keys");
} Prevention
- Always include keys pattern in every tables_configs entry
- Check for templating that produces empty strings
- Remove truly empty config entries
When it happens
Trigger: evaluate() processes tables_configs entries as ReadonlyConfig maps; entry i has no `keys` value, or `keys = ""` / `keys = " "` (whitespace-only), triggering the OptionValidationException at this line.
Common situations: Omitting `keys` when defining per-table configs, leaving the value empty after removing a pattern, or YAML/env templating that collapses an unset variable to an empty string.
Understand the failure class
Background: "is required", "must be set", "missing required field": configuration validation errors across open-source libraries — this error's family across 36 libraries.
Related errors
- nodes[ ]: host must not be blank in 'host:port', got
- nodes[ ]: port is out of range [ , ]
- nodes[ ]: port ' ' is out of range [ , ]
- All candidate sink tables were skipped during job parsing.
- AmazonDocumentDB option 'uri' must include authentication…
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/bddd7ae59b802150.
Report an issue: GitHub.
Appendix: source
Thrown at seatunnel-connectors-v2/connector-redis/src/main/java/org/apache/seatunnel/connectors/seatunnel/redis/config/RedisTableConfigsValidator.java:41
import java.util.List;
import java.util.Map;
public class RedisTableConfigsValidator implements ConditionExtension<List<Map<String, Object>>> {
@Override
public String description() {
return "each 'tables_configs' entry must declare a non-blank 'keys' and a 'data_type'";
}
@Override
public boolean evaluate(ReadonlyConfig config, List<Map<String, Object>> entries)
throws OptionValidationException {
for (int i = 0; i < entries.size(); i++) {
ReadonlyConfig entry = ReadonlyConfig.fromMap(entries.get(i));
String keys = entry.getOptional(RedisBaseOptions.KEY_PATTERN).orElse(null);
if (keys == null || keys.trim().isEmpty()) {
throw new OptionValidationException(
"tables_configs[%d]: 'keys' must be configured and non-blank", i);
}
if (!entry.getOptional(RedisBaseOptions.DATA_TYPE).isPresent()) {
throw new OptionValidationException(
"tables_configs[%d]: 'data_type' must be configured", i);
}
}
return true;
}
}
View on GitHub (pinned to cf67b549a7)