apache/seatunnel · warning

No columns found for catalog '{}', schema '{}', table '{}'.

Error message

No columns found for catalog '{}', schema '{}', table '{}'. Filtered {} rows returned by JDBC driver. The table may not exist or the database requires exact identifier case.

What it means

When mapping a JDBC ResultSet metadata row set into SeaTunnel columns, the dialect's type mapper filters out rows whose types it cannot map. If every returned row was filtered and no columns remain, this warning is logged: the JDBC driver returned metadata rows (filteredRows > 0) but none produced a column, typically because the table name/schema/catalog identifiers did not match in case, or the table does not actually exist. getTableSchema will then produce an empty column list.

Source

Thrown at seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/internal/dialect/JdbcDialectTypeMapper.java:145

                String comment = rs.getString("REMARKS");

                BasicTypeDefine typeDefine =
                        BasicTypeDefine.builder()
                                .name(columnName)
                                .columnType(nativeType)
                                .dataType(nativeType)
                                .sqlType(sqlType)
                                .length((long) columnSize)
                                .precision((long) columnSize)
                                .scale(decimalDigits)
                                .nullable(nullable == DatabaseMetaData.columnNullable)
                                .comment(comment)
                                .build();
                columns.add(mappingColumn(typeDefine));
            }
        }
        if (columns.isEmpty() && filteredRows > 0) {
            LOG.warn(
                    "No columns found for catalog '{}', schema '{}', table '{}'. Filtered {} rows returned by JDBC driver. "
                            + "The table may not exist or the database requires exact identifier case.",
                    catalog,
                    schemaPattern,
                    tableNamePattern,
                    filteredRows);
        }
        return columns;
    }

    default List<Column> mappingColumn(ResultSetMetaData metadata) throws SQLException {
        List<Column> columns = new ArrayList<>();
        for (int index = 1; index <= metadata.getColumnCount(); index++) {
            Column column = mappingColumn(metadata, index);
            columns.add(column);
        }
        return columns;
    }

View on GitHub (pinned to cf67b549a7)

Solutions

  1. Quote or match the exact identifier case in the table path / catalog, schema, table options (e.g. use MYTABLE for DB2)
  2. Verify the table exists: run the same catalog/schema/table lookup via the driver or 'SELECT ... FROM syscat.tables'
  3. Update the connector/dialect version if the column types are new and being filtered as unsupported
  4. Enable driver-level metadata logging to inspect which rows and types were filtered

Example fix

// before
table_path = "mydb.public.orders"
// after (exact case as stored by the database, e.g. DB2 uppercase)
table_path = "MYDB.PUBLIC.ORDERS"
Defensive patterns

Strategy: validation

Validate before calling

// before getTableSchema, verify identifier case against the database
try (Connection c = dataSource.getConnection()) {
    ResultSet rs = c.getMetaData().getTables(catalog, schemaPattern, tableNamePattern, null);
    if (!rs.next()) {
        throw new IllegalStateException("Table not found; check exact case of " + catalog + "." + schemaPattern + "." + tableNamePattern);
    }
}

Type guard

boolean hasUsableColumns(TableSchema s) {
    return s != null && s.getColumns() != null && !s.getColumns().isEmpty();
}

Try / catch

try {
    TableSchema schema = catalog.getTableSchema(tablePath);
    if (schema.getColumns().isEmpty()) {
        throw new IllegalStateException("Empty schema for " + tablePath + "; check identifier case");
    }
} catch (RuntimeException e) {
    // fall back to explicit case-quoted identifiers and retry once
}

Prevention

When it happens

Trigger: getTableSchema calls mappingColumn for each metadata row; rows for unrecognized SQL types are skipped. If the table was looked up with wrong-case identifiers (e.g. lowercase 'mytable' on an upper-case-only DB2/Oracle catalog) or the table is missing, the driver returns rows that are all filtered, leaving columns empty.

Common situations: Connecting to DB2/Oracle/DM where unquoted identifiers are stored uppercase but configured lowercase in the SeaTunnel table path; typos in catalog/schema/table options; querying a table that was dropped or exists only in another schema; driver returning odd types for temporal/XML columns that the mapper 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/ed060d647b300e8f. Report an issue: GitHub.