Interface TableProvider
-
- All Known Subinterfaces:
CustomTableResolver,MetaStore
- All Known Implementing Classes:
AvroTableProvider,BigQueryTableProvider,BigtableTableProvider,DataGeneratorTableProvider,DataStoreV1TableProvider,FullNameTableProvider,GenerateSequenceTableProvider,InMemoryMetaStore,InMemoryMetaTableProvider,KafkaTableProvider,MongoDbTableProvider,ParquetTableProvider,PubsubLiteTableProvider,PubsubTableProvider,ReadOnlyTableProvider,SchemaIOTableProviderWrapper,TestTableProvider,TextTableProvider
public interface TableProviderATableProviderhandles the metadata CRUD of a specified kind of tables.So there will be a provider to handle textfile(CSV) based tables, there is a provider to handle MySQL based tables, a provider to handle Casandra based tables etc.
Note: all implementations marked with
@AutoService(TableProvider.class)are automatically loaded by CLI or other cases whenJdbcDriveris used with default connection parameters.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description BeamSqlTablebuildBeamSqlTable(Table table)Build aBeamSqlTableusing the given table meta info.voidcreateTable(Table table)Creates a table.voiddropTable(java.lang.String tableName)Drops a table.default @Nullable TableProvidergetSubProvider(java.lang.String name)Returns a sub-provider, e.g.default java.util.Set<java.lang.String>getSubProviders()Returns all sub-providers, e.g.default @Nullable TablegetTable(java.lang.String tableName)Get a specific table from this provider it is present, or null if it is not present.java.util.Map<java.lang.String,Table>getTables()Get all tables from this provider.java.lang.StringgetTableType()Gets the table type this provider handles.default booleansupportsPartitioning(Table table)
-
-
-
Method Detail
-
getTableType
java.lang.String getTableType()
Gets the table type this provider handles.
-
createTable
void createTable(Table table)
Creates a table.
-
dropTable
void dropTable(java.lang.String tableName)
Drops a table.- Parameters:
tableName-
-
getTables
java.util.Map<java.lang.String,Table> getTables()
Get all tables from this provider.
-
getTable
default @Nullable Table getTable(java.lang.String tableName)
Get a specific table from this provider it is present, or null if it is not present.
-
buildBeamSqlTable
BeamSqlTable buildBeamSqlTable(Table table)
Build aBeamSqlTableusing the given table meta info.
-
getSubProviders
default java.util.Set<java.lang.String> getSubProviders()
Returns all sub-providers, e.g. sub-schemas. Temporary, this logic needs to live inBeamCalciteSchema.
-
getSubProvider
default @Nullable TableProvider getSubProvider(java.lang.String name)
Returns a sub-provider, e.g. sub-schema. Temporary, this logic needs to live inBeamCalciteSchema.
-
supportsPartitioning
default boolean supportsPartitioning(Table table)
-
-