@Experimental public class HCatalogBeamSchema extends java.lang.Object
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.
Modifier and Type | Method and Description |
---|---|
static HCatalogBeamSchema |
create(java.util.Map<java.lang.String,java.lang.String> config)
Create the schema adapter.
|
org.apache.beam.vendor.guava.v20_0.com.google.common.base.Optional<Schema> |
getTableSchema(java.lang.String db,
java.lang.String table)
Gets the table schema, or absent optional if the table doesn't exist in the database.
|
boolean |
hasDatabase(java.lang.String dbName)
Checks if metastore client has the specified database.
|
public static HCatalogBeamSchema create(java.util.Map<java.lang.String,java.lang.String> config)
Config map is used to construct the HiveMetaStoreClient
.
public boolean hasDatabase(java.lang.String dbName)
public org.apache.beam.vendor.guava.v20_0.com.google.common.base.Optional<Schema> getTableSchema(java.lang.String db, java.lang.String table)