Class BigtableTableProvider

  • All Implemented Interfaces:
    TableProvider

    @Internal
    @AutoService(TableProvider.class)
    public class BigtableTableProvider
    extends InMemoryMetaTableProvider
    TableProvider for BigtableTable.

    A sample of BigTable table is:

    {@code
       CREATE EXTERNAL TABLE beamTable(
         key VARCHAR NOT NULL,
         familyTest ROW<
           boolColumn BOOLEAN NOT NULL,
           longColumnWithTsAndLabels ROW<
             val BIGINT NOT NULL,
             timestampMicros BIGINT NOT NULL,
             labels VARCHAR
           > NOT NULL,
           stringArrayColumn ARRAY NOT NULL,
           doubleColumn DOUBLE NOT NULL,
           binaryColumn BINARY NOT NULL
         > NOT NULL
       )
       TYPE 'bigtable'
       LOCATION 'googleapis.com/bigtable/projects//instances//tables/'
     

    Flat-schema table is also supported. It requires an additional property "columnsMapping" which describes which familyColumn describes which value in the form "familyName:columnQualifier":

    {@code
       CREATE EXTERNAL TABLE beamTable(
         key VARCHAR NOT NULL,
         boolColumn BOOLEAN NOT NULL,
         longColumn BIGINT NOT NULL,
         stringColumn VARCHAR NOT NULL,
         doubleColumn DOUBLE NOT NULL,
         binaryColumn BINARY NOT NULL
       )
       TYPE 'bigtable'
       LOCATION 'googleapis.com/bigtable/projects//instances//tables/'
       TBLPROPERTIES '{
         "columnsMapping": "f:boolColumn,f:longColumn,f:stringColumn,f2:doubleColumn,f2:binaryColumn"
       }'
     
    • Constructor Detail

      • BigtableTableProvider

        public BigtableTableProvider()
    • Method Detail

      • getTableType

        public java.lang.String getTableType()
        Description copied from interface: TableProvider
        Gets the table type this provider handles.