Package org.apache.beam.sdk.io.hcatalog
Class HCatalogBeamSchema
java.lang.Object
org.apache.beam.sdk.io.hcatalog.HCatalogBeamSchema
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 Summary
Modifier and TypeMethodDescriptionstatic HCatalogBeamSchema
Create the schema adapter.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.boolean
hasDatabase
(String dbName) Checks if metastore client has the specified database.
-
Method Details
-
create
Create the schema adapter.Config map is used to construct the
HiveMetaStoreClient
. -
hasDatabase
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.
-