{"record":{"id":"be989c5db9679f7f","repo":"prestodb/presto","slug":"not-supported-be989c","errorCode":"NOT_SUPPORTED","errorMessage":"This connector does not support get views","messagePattern":"This connector does not support get views","errorType":"error_code","errorClass":"PrestoException","httpStatus":null,"severity":"error","filePath":"presto-iceberg/src/main/java/com/facebook/presto/iceberg/IcebergUtil.java","lineNumber":314,"sourceCode":"                hdfsEnvironment,\n                hdfsContext,\n                config,\n                manifestFileCache,\n                table.getSchemaName(),\n                table.getTableName());\n        return new BaseTable(operations, fullTableName(catalogName.getCatalogName(), TableIdentifier.of(table.getSchemaName(), table.getTableName())));\n    }\n\n    public static Table getNativeIcebergTable(IcebergNativeCatalogFactory catalogFactory, ConnectorSession session, SchemaTableName table)\n    {\n        return catalogFactory.getCatalog(session).loadTable(toIcebergTableIdentifier(table, catalogFactory.isNestedNamespaceEnabled()));\n    }\n\n    public static View getNativeIcebergView(IcebergNativeCatalogFactory catalogFactory, ConnectorSession session, SchemaTableName table)\n    {\n        Catalog catalog = catalogFactory.getCatalog(session);\n        if (!(catalog instanceof ViewCatalog)) {\n            throw new PrestoException(NOT_SUPPORTED, \"This connector does not support get views\");\n        }\n        return ((ViewCatalog) catalog).loadView(toIcebergTableIdentifier(getBaseSchemaTableName(table), catalogFactory.isNestedNamespaceEnabled()));\n    }\n\n    /**\n     * Removes Iceberg-specific suffixes from the table name\n     */\n    private static SchemaTableName getBaseSchemaTableName(SchemaTableName table)\n    {\n        IcebergTableName icebergTableName = IcebergTableName.from(table.getTableName());\n        return new SchemaTableName(table.getSchemaName(), icebergTableName.getTableName());\n    }\n\n    public static TableOperations opsFromTable(Table table)\n    {\n        if (table instanceof BaseTransaction.TransactionTable) {\n            return ((BaseTransaction.TransactionTable) table).operations();\n        }","sourceCodeStart":296,"sourceCodeEnd":332,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-iceberg/src/main/java/com/facebook/presto/iceberg/IcebergUtil.java#L296-L332","documentation":"getNativeIcebergView loads a view from a native Iceberg catalog. Views are only available when the underlying catalog implements the ViewCatalog interface; if the configured catalog (Hadoop/Hive-metastore flavor, etc.) does not support views, the connector throws NOT_SUPPORTED rather than attempting an unsupported cast.","triggerScenarios":"Calling getNativeIcebergView (e.g. via SHOW CREATE VIEW, SELECT from a view, or metadata listing) when catalogFactory.getCatalog(session) returns a Catalog that is not a ViewCatalog.","commonSituations":"Using an Iceberg catalog implementation without view support (older Iceberg runtime or Hadoop catalog) while queries reference views; environment misconfiguration pointing the connector at a catalog type that lacks view tables; version downgrade removing ViewCatalog support.","solutions":["Configure a catalog implementation that supports views (implements ViewCatalog), e.g. a JDBC or REST/nested-namespace catalog with view support.","Move views out of this catalog into one that supports them, or replace views with tables.","Check the Iceberg runtime version bundled with Presto for ViewCatalog availability."],"exampleFix":"// before (properties)\niceberg.catalog.type=hadoop\n// after\niceberg.catalog.type=jdbc  # a catalog supporting views","handlingStrategy":"type-guard","validationCode":"Catalog catalog = catalogFactory.getCatalog(session);\nif (!(catalog instanceof ViewCatalog)) {\n    // skip view handling or route to a view-capable catalog\n}","typeGuard":"boolean catalogSupportsViews(IcebergNativeCatalogFactory factory, ConnectorSession session) {\n    return factory.getCatalog(session) instanceof ViewCatalog;\n}","tryCatchPattern":"try {\n    View view = IcebergUtil.getNativeIcebergView(catalogFactory, session, name);\n} catch (PrestoException e) {\n    if (e.getErrorCode() == NOT_SUPPORTED.toErrorCode() &&\n        e.getMessage().contains(\"does not support get views\")) {\n        throw new UnsupportedOperationException(\n            \"Catalog \" + catalog.getClass().getSimpleName() + \" has no view support; use a JDBC/REST catalog\", e);\n    }\n    throw e;\n}","preventionTips":["Check catalog instanceof ViewCatalog before any view operation","Choose a catalog type that implements ViewCatalog if views are required","Keep views in a dedicated view-capable catalog when mixing catalog types","Pin an Iceberg runtime version that includes ViewCatalog support"],"tags":["iceberg","views","catalog","not-supported"],"backgroundTag":"unsupported-catalog-feature","analyzedSha":"55bb57d202de3b926896fa966c2c4a44c779634e","analyzedAt":"2026-09-04T12:50:26.162Z","contentChangedAt":"2026-09-04T12:50:26.162Z","schemaVersion":2},"datasetVersion":"2026-09-12T02:17:10.037Z"}