apache/seatunnel · error · IllegalArgumentException
Vitess CDC table-pattern
Error message
Vitess CDC table-pattern '%s' did not match any declared schema table.
What it means
Thrown by filterDeclaredTables when a configured table-pattern regex matches none of the declared schema tables (matched against TablePath.toString()). The connector fails fast instead of proceeding with zero tables.
Solutions
- Include the keyspace in the pattern, e.g. "commerce\\..*" or "commerce.orders"
- Print/log the declared table paths and adjust the regex to match their exact toString() form
- Verify case sensitivity and anchor the pattern correctly (regex must fully match the path)
- Fix table names in the pattern after upstream Vitess renames
Example fix
// before table-pattern = "orders.*" // after table-pattern = "commerce\\..*"
Defensive patterns
Strategy: validation
Validate before calling
Pattern p = Pattern.compile(tablePattern);
boolean any = declaredTables.stream().anyMatch(t -> p.matcher(t.getTablePath().toString()).matches());
if (!any) throw new IllegalArgumentException("pattern matches no declared table"); Try / catch
try { factory.resolveCatalogTables(context); } catch (IllegalArgumentException e) { /* adjust regex to declared paths */ } Prevention
- Remember patterns are matched against fully-qualified 'keyspace.table' strings
- Escape dots in table names (\\.) in regexes
- Log declared table paths when debugging pattern mismatches
- Test regexes against actual paths before submitting jobs
When it happens
Trigger: table-pattern regex that does not match any CatalogTable's table path string among the declared tables during resolveCatalogTables.
Common situations: Regex missing the keyspace prefix (paths are fully qualified, e.g. 'commerce.orders'); case mismatch in the regex; tables renamed in Vitess; escaping issues with '.' in patterns.
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
- startup.specific-offset.vgtid is required when…
- tables_configs can not be empty.
- Unsupported Vitess catalog SQL type:
- Vitess CDC accepts either table-names or table-pattern, but…
- Vitess CDC bootstrap schema does not support catalog SQL…
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/65ef0ae94e8f734a.
Report an issue: GitHub.
Appendix: source
Thrown at seatunnel-connectors-v2/connector-cdc/connector-cdc-vitess/src/main/java/org/apache/seatunnel/connectors/seatunnel/cdc/vitess/source/VitessSourceFactory.java:218
tableName)));
selectedTables.add(matchedTable);
}
return selectedTables;
}
Optional<String> tablePattern =
context.getOptions().getOptional(ConnectorCommonOptions.TABLE_PATTERN);
if (tablePattern.isPresent()) {
Pattern regex = Pattern.compile(tablePattern.get());
List<CatalogTable> selectedTables =
declaredTables.stream()
.filter(
table ->
regex.matcher(table.getTablePath().toString())
.matches())
.collect(Collectors.toList());
if (selectedTables.isEmpty()) {
throw new IllegalArgumentException(
String.format(
"Vitess CDC table-pattern '%s' did not match any declared schema table.",
tablePattern.get()));
}
return selectedTables;
}
return declaredTables;
}
private <SplitT extends SourceSplit, StateT extends Serializable>
List<CatalogTable> extractCheckpointTables(
ChangeStreamTableSourceState<StateT, SplitT> state) {
if (state == null || state.getSplits() == null) {
return Collections.emptyList();
}
for (List<SplitT> splitGroup : state.getSplits()) {
if (splitGroup == null) {View on GitHub (pinned to cf67b549a7)