Class BigQueryMetastoreCatalog

java.lang.Object
org.apache.iceberg.BaseMetastoreCatalog
org.apache.iceberg.gcp.bigquery.BigQueryMetastoreCatalog
All Implemented Interfaces:
Closeable, AutoCloseable, org.apache.iceberg.catalog.Catalog, org.apache.iceberg.catalog.SupportsNamespaces, org.apache.iceberg.hadoop.Configurable<Object>

public class BigQueryMetastoreCatalog extends org.apache.iceberg.BaseMetastoreCatalog implements org.apache.iceberg.catalog.SupportsNamespaces, org.apache.iceberg.hadoop.Configurable<Object>
Iceberg Bigquery Metastore Catalog implementation.
  • Nested Class Summary

    Nested classes/interfaces inherited from class org.apache.iceberg.BaseMetastoreCatalog

    org.apache.iceberg.BaseMetastoreCatalog.BaseMetastoreCatalogTableBuilder

    Nested classes/interfaces inherited from interface org.apache.iceberg.catalog.Catalog

    org.apache.iceberg.catalog.Catalog.TableBuilder
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    Deprecated.
    since 1.11.0, will be removed in 1.12.0; use BigQueryProperties.GCP_LOCATION instead.
    static final String
    Deprecated.
    since 1.11.0, will be removed in 1.12.0; use BigQueryProperties.LIST_ALL_TABLES instead.
    static final String
    Deprecated.
    since 1.11.0, will be removed in 1.12.0; use BigQueryProperties.PROJECT_ID instead.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    createNamespace(org.apache.iceberg.catalog.Namespace namespace, Map<String,String> metadata)
     
    protected String
    defaultWarehouseLocation(org.apache.iceberg.catalog.TableIdentifier identifier)
     
    boolean
    dropNamespace(org.apache.iceberg.catalog.Namespace namespace)
     
    boolean
    dropTable(org.apache.iceberg.catalog.TableIdentifier identifier, boolean purge)
     
    void
    initialize(String name, Map<String,String> properties)
     
    protected boolean
    isValidIdentifier(org.apache.iceberg.catalog.TableIdentifier identifier)
     
    List<org.apache.iceberg.catalog.Namespace>
     
    List<org.apache.iceberg.catalog.Namespace>
    listNamespaces(org.apache.iceberg.catalog.Namespace namespace)
    Since this catalog only supports one-level namespaces, it always returns an empty list unless passed an empty namespace to list all namespaces within the catalog.
    List<org.apache.iceberg.catalog.TableIdentifier>
    listTables(org.apache.iceberg.catalog.Namespace namespace)
     
    loadNamespaceMetadata(org.apache.iceberg.catalog.Namespace namespace)
     
     
    protected org.apache.iceberg.TableOperations
    newTableOps(org.apache.iceberg.catalog.TableIdentifier identifier)
     
    protected Map<String,String>
     
    boolean
    removeProperties(org.apache.iceberg.catalog.Namespace namespace, Set<String> properties)
     
    void
    renameTable(org.apache.iceberg.catalog.TableIdentifier from, org.apache.iceberg.catalog.TableIdentifier to)
     
    void
     
    boolean
    setProperties(org.apache.iceberg.catalog.Namespace namespace, Map<String,String> properties)
     

    Methods inherited from class org.apache.iceberg.BaseMetastoreCatalog

    buildTable, close, fullTableName, isValidMetadataIdentifier, loadTable, metricsReporter, registerTable, toString

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.apache.iceberg.catalog.Catalog

    createTable, createTable, createTable, createTable, dropTable, invalidateTable, newCreateTableTransaction, newCreateTableTransaction, newCreateTableTransaction, newCreateTableTransaction, newReplaceTableTransaction, newReplaceTableTransaction, newReplaceTableTransaction, newReplaceTableTransaction, registerTable, tableExists

    Methods inherited from interface org.apache.iceberg.catalog.SupportsNamespaces

    createNamespace, namespaceExists
  • Field Details

    • PROJECT_ID

      @Deprecated public static final String PROJECT_ID
      Deprecated.
      since 1.11.0, will be removed in 1.12.0; use BigQueryProperties.PROJECT_ID instead.
      See Also:
    • GCP_LOCATION

      @Deprecated public static final String GCP_LOCATION
      Deprecated.
      since 1.11.0, will be removed in 1.12.0; use BigQueryProperties.GCP_LOCATION instead.
      See Also:
    • LIST_ALL_TABLES

      @Deprecated public static final String LIST_ALL_TABLES
      Deprecated.
      since 1.11.0, will be removed in 1.12.0; use BigQueryProperties.LIST_ALL_TABLES instead.
      See Also:
  • Constructor Details

    • BigQueryMetastoreCatalog

      public BigQueryMetastoreCatalog()
  • Method Details

    • initialize

      public void initialize(String name, Map<String,String> properties)
      Specified by:
      initialize in interface org.apache.iceberg.catalog.Catalog
    • newTableOps

      protected org.apache.iceberg.TableOperations newTableOps(org.apache.iceberg.catalog.TableIdentifier identifier)
      Specified by:
      newTableOps in class org.apache.iceberg.BaseMetastoreCatalog
    • defaultWarehouseLocation

      protected String defaultWarehouseLocation(org.apache.iceberg.catalog.TableIdentifier identifier)
      Specified by:
      defaultWarehouseLocation in class org.apache.iceberg.BaseMetastoreCatalog
    • listTables

      public List<org.apache.iceberg.catalog.TableIdentifier> listTables(org.apache.iceberg.catalog.Namespace namespace)
      Specified by:
      listTables in interface org.apache.iceberg.catalog.Catalog
    • dropTable

      public boolean dropTable(org.apache.iceberg.catalog.TableIdentifier identifier, boolean purge)
      Specified by:
      dropTable in interface org.apache.iceberg.catalog.Catalog
    • renameTable

      public void renameTable(org.apache.iceberg.catalog.TableIdentifier from, org.apache.iceberg.catalog.TableIdentifier to)
      Specified by:
      renameTable in interface org.apache.iceberg.catalog.Catalog
    • createNamespace

      public void createNamespace(org.apache.iceberg.catalog.Namespace namespace, Map<String,String> metadata)
      Specified by:
      createNamespace in interface org.apache.iceberg.catalog.SupportsNamespaces
    • listNamespaces

      public List<org.apache.iceberg.catalog.Namespace> listNamespaces()
      Specified by:
      listNamespaces in interface org.apache.iceberg.catalog.SupportsNamespaces
    • listNamespaces

      public List<org.apache.iceberg.catalog.Namespace> listNamespaces(org.apache.iceberg.catalog.Namespace namespace)
      Since this catalog only supports one-level namespaces, it always returns an empty list unless passed an empty namespace to list all namespaces within the catalog.
      Specified by:
      listNamespaces in interface org.apache.iceberg.catalog.SupportsNamespaces
    • dropNamespace

      public boolean dropNamespace(org.apache.iceberg.catalog.Namespace namespace)
      Specified by:
      dropNamespace in interface org.apache.iceberg.catalog.SupportsNamespaces
    • setProperties

      public boolean setProperties(org.apache.iceberg.catalog.Namespace namespace, Map<String,String> properties)
      Specified by:
      setProperties in interface org.apache.iceberg.catalog.SupportsNamespaces
    • removeProperties

      public boolean removeProperties(org.apache.iceberg.catalog.Namespace namespace, Set<String> properties)
      Specified by:
      removeProperties in interface org.apache.iceberg.catalog.SupportsNamespaces
    • loadNamespaceMetadata

      public Map<String,String> loadNamespaceMetadata(org.apache.iceberg.catalog.Namespace namespace)
      Specified by:
      loadNamespaceMetadata in interface org.apache.iceberg.catalog.SupportsNamespaces
    • isValidIdentifier

      protected boolean isValidIdentifier(org.apache.iceberg.catalog.TableIdentifier identifier)
      Overrides:
      isValidIdentifier in class org.apache.iceberg.BaseMetastoreCatalog
    • name

      public String name()
      Specified by:
      name in interface org.apache.iceberg.catalog.Catalog
    • properties

      protected Map<String,String> properties()
      Overrides:
      properties in class org.apache.iceberg.BaseMetastoreCatalog
    • setConf

      public void setConf(Object conf)
      Specified by:
      setConf in interface org.apache.iceberg.hadoop.Configurable<Object>