{"record":{"id":"65ef0ae94e8f734a","repo":"apache/seatunnel","slug":"vitess-cdc-table-pattern-s-did-not-match-any-de","errorCode":null,"errorMessage":"Vitess CDC table-pattern '%s' did not match any declared schema table.","messagePattern":"Vitess CDC table-pattern '(.+?)' did not match any declared schema table\\.","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-cdc/connector-cdc-vitess/src/main/java/org/apache/seatunnel/connectors/seatunnel/cdc/vitess/source/VitessSourceFactory.java","lineNumber":218,"sourceCode":"                                                                tableName)));\n                selectedTables.add(matchedTable);\n            }\n            return selectedTables;\n        }\n\n        Optional<String> tablePattern =\n                context.getOptions().getOptional(ConnectorCommonOptions.TABLE_PATTERN);\n        if (tablePattern.isPresent()) {\n            Pattern regex = Pattern.compile(tablePattern.get());\n            List<CatalogTable> selectedTables =\n                    declaredTables.stream()\n                            .filter(\n                                    table ->\n                                            regex.matcher(table.getTablePath().toString())\n                                                    .matches())\n                            .collect(Collectors.toList());\n            if (selectedTables.isEmpty()) {\n                throw new IllegalArgumentException(\n                        String.format(\n                                \"Vitess CDC table-pattern '%s' did not match any declared schema table.\",\n                                tablePattern.get()));\n            }\n            return selectedTables;\n        }\n\n        return declaredTables;\n    }\n\n    private <SplitT extends SourceSplit, StateT extends Serializable>\n            List<CatalogTable> extractCheckpointTables(\n                    ChangeStreamTableSourceState<StateT, SplitT> state) {\n        if (state == null || state.getSplits() == null) {\n            return Collections.emptyList();\n        }\n        for (List<SplitT> splitGroup : state.getSplits()) {\n            if (splitGroup == null) {","sourceCodeStart":200,"sourceCodeEnd":236,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-cdc/connector-cdc-vitess/src/main/java/org/apache/seatunnel/connectors/seatunnel/cdc/vitess/source/VitessSourceFactory.java#L200-L236","documentation":"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.","triggerScenarios":"table-pattern regex that does not match any CatalogTable's table path string among the declared tables during resolveCatalogTables.","commonSituations":"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.","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"],"exampleFix":"// before\ntable-pattern = \"orders.*\"\n// after\ntable-pattern = \"commerce\\\\..*\"","handlingStrategy":"validation","validationCode":"Pattern p = Pattern.compile(tablePattern);\nboolean any = declaredTables.stream().anyMatch(t -> p.matcher(t.getTablePath().toString()).matches());\nif (!any) throw new IllegalArgumentException(\"pattern matches no declared table\");","typeGuard":null,"tryCatchPattern":"try { factory.resolveCatalogTables(context); } catch (IllegalArgumentException e) { /* adjust regex to declared paths */ }","preventionTips":["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"],"tags":["cdc","vitess","regex","table-selection"],"backgroundTag":"empty-result-set","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}