{"record":{"id":"928fc6df5090355c","repo":"apache/seatunnel","slug":"no-tables-found-matching-regex-pattern","errorCode":null,"errorMessage":"No tables found matching regex pattern: {}","messagePattern":"No tables found matching regex pattern: (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/utils/JdbcCatalogUtils.java","lineNumber":568,"sourceCode":"                            tableNamePattern.replace(DOT_PLACEHOLDER, \".\"));\n        }\n\n        log.info(\n                \"Parsed patterns - database: {}, full table pattern: {}\",\n                databasePattern,\n                fullTablePattern);\n\n        Map<String, Object> configMap = new HashMap<>();\n        configMap.put(ConnectorCommonOptions.DATABASE_PATTERN.key(), databasePattern);\n        configMap.put(ConnectorCommonOptions.TABLE_PATTERN.key(), fullTablePattern);\n\n        ReadonlyConfig config = ReadonlyConfig.fromMap(configMap);\n\n        try {\n            List<CatalogTable> catalogTables = jdbcCatalog.getTables(config);\n\n            if (catalogTables.isEmpty()) {\n                log.warn(\"No tables found matching regex pattern: {}\", tablePath);\n                return;\n            }\n\n            for (CatalogTable catalogTable : catalogTables) {\n                TablePath path = catalogTable.getTableId().toTablePath();\n\n                JdbcSourceTable jdbcSourceTable =\n                        JdbcSourceTable.builder()\n                                .tablePath(path)\n                                .partitionColumn(tableConfig.getPartitionColumn())\n                                .partitionNumber(tableConfig.getPartitionNumber())\n                                .partitionStart(tableConfig.getPartitionStart())\n                                .partitionEnd(tableConfig.getPartitionEnd())\n                                .useSelectCount(tableConfig.getUseSelectCount())\n                                .skipAnalyze(tableConfig.getSkipAnalyze())\n                                .catalogTable(catalogTable)\n                                .build();\n","sourceCodeStart":550,"sourceCodeEnd":586,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/utils/JdbcCatalogUtils.java#L550-L586","documentation":"When a table path uses a regex pattern, JdbcCatalogUtils resolves it via the JDBC catalog and warns when the resolved table list is empty — no tables matched the pattern. The method returns early without adding any source tables.","triggerScenarios":"processRegexTablePath calls jdbcCatalog.getTables(config); the returned catalogTables list is empty for the given regex (e.g. table_path=\"db|^t.*\" that matches nothing), so this warning is logged.","commonSituations":"Regex typo or wrong database pattern; pattern written against a case-sensitive catalog while the DB stores lowercase names; running against the wrong database/connection; table name pattern that matches tables excluded by type filters.","solutions":["Test the regex against actual table names in the database (e.g. matching all tables you expect)","Check database and table name case sensitivity vs the catalog's stored identifiers","Verify the connection points at the intended database/schema and instance","Enable catalog logging or enumerate tables without regex to confirm available names"],"exampleFix":"// before\ntable_path = \"database1|^tabel_.*\"      // misspelling matches nothing\n// after\ntable_path = \"database1|table_.*\"","handlingStrategy":"validation","validationCode":"// Verify regex matches expected tables before running the job\ntry (Connection c = DriverManager.getConnection(url, user, pass)) {\n    try (ResultSet rs = c.getMetaData().getTables(db, null, \"%\", null)) {\n        Pattern p = Pattern.compile(tablePathRegex);\n        boolean any = false;\n        while (rs.next()) any |= p.matcher(rs.getString(\"TABLE_NAME\")).find();\n        if (!any) throw new IllegalStateException(\"Regex matches no tables: \" + tablePathRegex);\n    }\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Test regex patterns with a quick metadata query before submission","Beware case-sensitive matching (use (?i) if needed)","Log the resolved table count; treat 0 as a config bug"],"tags":["jdbc","regex","discovery"],"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"}