prestodb/presto · warning · PrestoException

NOT_SUPPORTED

NOT_SUPPORTED

Error message

This connector does not support schema properties

What it means

ConnectorMetadata.getSchemaProperties() has a default implementation that throws NOT_SUPPORTED. Presto calls it to fetch metadata properties (e.g. from SHOW CREATE SCHEMA or CREATE SCHEMA ... WITH) for a schema, and any connector that does not override the method signals it cannot describe schema properties this way.

Source

Thrown at presto-spi/src/main/java/com/facebook/presto/spi/connector/ConnectorMetadata.java:100

     * Checks if a schema exists. The connector may have schemas that exist
     * but are not enumerable via {@link #listSchemaNames}.
     */
    default boolean schemaExists(ConnectorSession session, String schemaName)
    {
        return listSchemaNames(session).contains(schemaName);
    }

    /**
     * Returns the schemas provided by this connector.
     */
    List<String> listSchemaNames(ConnectorSession session);

    /**
     * Gets the schema properties for the specified schema.
     */
    default Map<String, Object> getSchemaProperties(ConnectorSession session, CatalogSchemaName schemaName)
    {
        throw new PrestoException(NOT_SUPPORTED, "This connector does not support schema properties");
    }

    /**
     * Returns a table handle for the specified table name, or null if the connector does not contain the table.
     */
    ConnectorTableHandle getTableHandle(ConnectorSession session, SchemaTableName tableName);

    /**
     * Returns an error for connectors which do not support table version AS OF/BEFORE expression.
     */
    default ConnectorTableHandle getTableHandle(ConnectorSession session, SchemaTableName tableName, Optional<ConnectorTableVersion> tableVersion)
    {
        throw new PrestoException(NOT_SUPPORTED, "This connector does not support table version AS OF/BEFORE expression");
    }

    /**
     * Returns a table handle for the specified table name, or null if the connector does not contain the table.
     * The returned table handle can contain information in analyzeProperties.

View on GitHub (pinned to 55bb57d202)

Solutions

  1. Implement getSchemaProperties(ConnectorSession, CatalogSchemaName) in the connector's ConnectorMetadata subclass and return the schema properties map
  2. If the connector genuinely has no schema properties, return Collections.emptyMap() instead of relying on the throwing default
  3. Route the query to a catalog whose connector supports schema properties

Example fix

// before (default in ConnectorMetadata)
throw new PrestoException(NOT_SUPPORTED, "This connector does not support schema properties");
// after (in your connector's Metadata)
@Override
public Map<String, Object> getSchemaProperties(ConnectorSession session, CatalogSchemaName schemaName) {
    return myCatalog.getSchemaProperties(schemaName.getSchemaName());
}
Defensive patterns

Strategy: validation

Validate before calling

// Presto can't introspect this directly; prefer SHOW CREATE SCHEMA <catalog>.<schema> first
// or in tooling: only call schema-property APIs for known schema-property-capable connectors
Set<String> schemaPropertyCapable = Set.of("hive", "iceberg", "delta_lake");
if (!schemaPropertyCapable.contains(catalogConnectorName)) { skipSchemaProperties(); }

Try / catch

try {
    Map<String, Object> props = metadata.getSchemaProperties(session, schemaName);
} catch (PrestoException e) {
    if (e.getErrorCode() == StandardErrorCode.NOT_SUPPORTED.toErrorCodeCode()) {
        props = Collections.emptyMap(); // treat as "no schema properties"
    } else throw e;
}

Prevention

When it happens

Trigger: A query or engine code path calls getSchemaProperties(session, schemaName) on a connector whose ConnectorMetadata class does not override the default getSchemaProperties method — e.g. SHOW CREATE SCHEMA, or accessing schema properties metadata for a catalog backed by a connector without schema-property support.

Common situations: Using a connector (simple file-based, legacy, or custom in-house connectors) that never implemented schema properties; issuing metadata commands against catalogs whose connectors only support table-level properties.

Understand the failure class

Background: Presto NOT_SUPPORTED error: what "not supported" means and how to fix it — this error's family across 3 libraries.

Related errors


AI-assisted analysis of prestodb/presto@55bb57d202 (2026-09-04). Data as JSON: /api/errors/90676e025fcfcbf8. Report an issue: GitHub.