apache/seatunnel · warning

No tables found matching regex pattern

Error message

No tables found matching regex pattern: {}

What it means

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.

Solutions

  1. Test the regex against actual table names in the database (e.g. matching all tables you expect)
  2. Check database and table name case sensitivity vs the catalog's stored identifiers
  3. Verify the connection points at the intended database/schema and instance
  4. Enable catalog logging or enumerate tables without regex to confirm available names

Example fix

// before
table_path = "database1|^tabel_.*"      // misspelling matches nothing
// after
table_path = "database1|table_.*"
Defensive patterns

Strategy: validation

Validate before calling

// Verify regex matches expected tables before running the job
try (Connection c = DriverManager.getConnection(url, user, pass)) {
    try (ResultSet rs = c.getMetaData().getTables(db, null, "%", null)) {
        Pattern p = Pattern.compile(tablePathRegex);
        boolean any = false;
        while (rs.next()) any |= p.matcher(rs.getString("TABLE_NAME")).find();
        if (!any) throw new IllegalStateException("Regex matches no tables: " + tablePathRegex);
    }
}

Prevention

When it happens

Trigger: 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.

Common situations: 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.

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/928fc6df5090355c. Report an issue: GitHub.

Appendix: source

Thrown at seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/utils/JdbcCatalogUtils.java:568

                            tableNamePattern.replace(DOT_PLACEHOLDER, "."));
        }

        log.info(
                "Parsed patterns - database: {}, full table pattern: {}",
                databasePattern,
                fullTablePattern);

        Map<String, Object> configMap = new HashMap<>();
        configMap.put(ConnectorCommonOptions.DATABASE_PATTERN.key(), databasePattern);
        configMap.put(ConnectorCommonOptions.TABLE_PATTERN.key(), fullTablePattern);

        ReadonlyConfig config = ReadonlyConfig.fromMap(configMap);

        try {
            List<CatalogTable> catalogTables = jdbcCatalog.getTables(config);

            if (catalogTables.isEmpty()) {
                log.warn("No tables found matching regex pattern: {}", tablePath);
                return;
            }

            for (CatalogTable catalogTable : catalogTables) {
                TablePath path = catalogTable.getTableId().toTablePath();

                JdbcSourceTable jdbcSourceTable =
                        JdbcSourceTable.builder()
                                .tablePath(path)
                                .partitionColumn(tableConfig.getPartitionColumn())
                                .partitionNumber(tableConfig.getPartitionNumber())
                                .partitionStart(tableConfig.getPartitionStart())
                                .partitionEnd(tableConfig.getPartitionEnd())
                                .useSelectCount(tableConfig.getUseSelectCount())
                                .skipAnalyze(tableConfig.getSkipAnalyze())
                                .catalogTable(catalogTable)
                                .build();

View on GitHub (pinned to cf67b549a7)