apache/seatunnel · error · DatabaseNotExistException

Database does not exist in catalog…

Error message

Database %s does not exist in catalog %s (DatabaseNotExistException)

What it means

DorisCatalog.createTable pre-checks the parent database and throws DatabaseNotExistException(catalogName, databaseName) when the target database does not exist, instead of implicitly creating it or failing with a raw SQL error.

Solutions

  1. Create the database first or enable auto-create options
  2. Fix the database name in the table path
  3. Verify you are connected to the intended Doris cluster
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at seatunnel-connectors-v2/connector-doris/src/main/java/org/apache/seatunnel/connectors/doris/catalog/DorisCatalog.java:401 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10). Data as JSON: /api/errors/b13be5e1d075fb7d. Report an issue: GitHub.

Appendix: source

Thrown at seatunnel-connectors-v2/connector-doris/src/main/java/org/apache/seatunnel/connectors/doris/catalog/DorisCatalog.java:401

                        .name(columnName)
                        .columnType(columnType)
                        .dataType(dataType)
                        .length(Math.max(charOctetLength, numberPrecision))
                        .precision(numberPrecision)
                        .scale(Math.max(numberScale, timePrecision))
                        .nullable(isNullable)
                        .defaultValue(defaultValue)
                        .comment(comment)
                        .build();
        return typeConverter.convert(typeDefine);
    }

    @Override
    public void createTable(TablePath tablePath, CatalogTable table, boolean ignoreIfExists)
            throws TableAlreadyExistException, DatabaseNotExistException, CatalogException {

        if (!databaseExists(tablePath.getDatabaseName())) {
            throw new DatabaseNotExistException(catalogName, tablePath.getDatabaseName());
        }

        boolean tableExists = tableExists(tablePath);
        if (ignoreIfExists && tableExists) {
            LOG.info("table {} is exists, skip create", tablePath.getFullName());
            return;
        }

        if (tableExists) {
            throw new TableAlreadyExistException(catalogName, tablePath);
        }

        String stmt =
                DorisCatalogUtil.getCreateTableStatement(
                        createTableTemplate, tablePath, table, typeConverter);
        try (Statement statement = conn.createStatement()) {
            statement.execute(stmt);
        } catch (SQLException e) {

View on GitHub (pinned to cf67b549a7)