Class HCatalogBeamSchema

java.lang.Object
org.apache.beam.sdk.io.hcatalog.HCatalogBeamSchema

public class HCatalogBeamSchema extends Object
Adapter from HCatalog table schema to Beam Schema.

Loads a table schema from Hive Metastore specified in properties map, similar to HCatalogIO.

One of the use cases is to perform the schema conversion without leaking any HCatalog types.

  • Method Details

    • create

      public static HCatalogBeamSchema create(Map<String,String> config)
      Create the schema adapter.

      Config map is used to construct the HiveMetaStoreClient.

    • hasDatabase

      public boolean hasDatabase(String dbName)
      Checks if metastore client has the specified database.
    • getTableSchema

      public org.apache.beam.vendor.guava.v32_1_2_jre.com.google.common.base.Optional<Schema> getTableSchema(String db, String table)
      Gets the table schema, or absent optional if the table doesn't exist in the database.