Interface TableProvider

All Known Subinterfaces:
CustomTableResolver, MetaStore
All Known Implementing Classes:
AvroTableProvider, BigQueryTableProvider, BigtableTableProvider, DataCatalogTableProvider, DataGeneratorTableProvider, DataStoreV1TableProvider, FullNameTableProvider, GenerateSequenceTableProvider, IcebergTableProvider, InMemoryMetaStore, InMemoryMetaTableProvider, KafkaTableProvider, MongoDbTableProvider, ParquetTableProvider, PubsubLiteTableProvider, PubsubTableProvider, ReadOnlyTableProvider, SchemaIOTableProviderWrapper, TestTableProvider, TextTableProvider

public interface TableProvider
A TableProvider handles 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 when JdbcDriver is used with default connection parameters.

  • Method Details

    • getTableType

      String getTableType()
      Gets the table type this provider handles.
    • createTable

      void createTable(Table table)
      Creates a table.
    • dropTable

      void dropTable(String tableName)
      Drops a table.
      Parameters:
      tableName -
    • getTables

      Map<String,Table> getTables()
      Get all tables from this provider.
    • getTable

      default @Nullable Table getTable(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 a BeamSqlTable using the given table meta info.
    • getSubProviders

      default Set<String> getSubProviders()
      Returns all sub-providers, e.g. sub-schemas. Temporary, this logic needs to live in BeamCalciteSchema.
    • getSubProvider

      default TableProvider getSubProvider(String name)
      Returns a sub-provider, e.g. sub-schema. Temporary, this logic needs to live in BeamCalciteSchema.
    • supportsPartitioning

      default boolean supportsPartitioning(Table table)