Class DataCatalogTableProvider
java.lang.Object
org.apache.beam.sdk.extensions.sql.meta.provider.FullNameTableProvider
org.apache.beam.sdk.extensions.sql.meta.provider.datacatalog.DataCatalogTableProvider
- All Implemented Interfaces:
AutoCloseable,CustomTableResolver,TableProvider
Uses DataCatalog to get the source type and schema for a table.
-
Method Summary
Modifier and TypeMethodDescriptionbuildBeamSqlTable(Table table) Build aBeamSqlTableusing the given table meta info.voidclose()static DataCatalogTableProvidercreate(DataCatalogPipelineOptions options) static com.google.cloud.datacatalog.v1beta1.DataCatalogClientvoidcreateTable(Table table) Creates a table.voidDrops a table.Get a specific table from this provider it is present, or null if it is not present.getTableByFullName(TableName fullTableName) Get all tables from this provider.Gets the table type this provider handles.booleansetSchemaIfNotPresent(String resource, Schema schema) Methods inherited from class org.apache.beam.sdk.extensions.sql.meta.provider.FullNameTableProvider
getSubProvider, registerKnownTableNamesMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.beam.sdk.extensions.sql.meta.provider.TableProvider
getSubProviders, supportsPartitioning
-
Method Details
-
create
-
getTableType
Description copied from interface:TableProviderGets the table type this provider handles.- Specified by:
getTableTypein interfaceTableProvider
-
createTable
Description copied from interface:TableProviderCreates a table.- Specified by:
createTablein interfaceTableProvider
-
dropTable
Description copied from interface:TableProviderDrops a table.- Specified by:
dropTablein interfaceTableProvider- Parameters:
tableName-
-
getTables
Description copied from interface:TableProviderGet all tables from this provider.- Specified by:
getTablesin interfaceTableProvider
-
getTable
Description copied from interface:TableProviderGet a specific table from this provider it is present, or null if it is not present.- Specified by:
getTablein interfaceTableProvider
-
getTableByFullName
- Specified by:
getTableByFullNamein classFullNameTableProvider
-
buildBeamSqlTable
Description copied from interface:TableProviderBuild aBeamSqlTableusing the given table meta info.- Specified by:
buildBeamSqlTablein interfaceTableProvider
-
createDataCatalogClient
@Internal public static com.google.cloud.datacatalog.v1beta1.DataCatalogClient createDataCatalogClient(DataCatalogPipelineOptions options) -
setSchemaIfNotPresent
-
close
public void close()- Specified by:
closein interfaceAutoCloseable
-