@Internal @Experimental @AutoService(value=TableProvider.class) public class BigtableTableProvider extends InMemoryMetaTableProvider
TableProvider
for BigtableTable
.
A sample of BigTable table is:
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 ARRAYNOT 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 and Description |
---|
BigtableTableProvider() |
Modifier and Type | Method and Description |
---|---|
BeamSqlTable |
buildBeamSqlTable(Table table)
Build a
BeamSqlTable using the given table meta info. |
java.lang.String |
getTableType()
Gets the table type this provider handles.
|
createTable, dropTable, getTables
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getSubProvider, getSubProviders, getTable
public java.lang.String getTableType()
TableProvider
public BeamSqlTable buildBeamSqlTable(Table table)
TableProvider
BeamSqlTable
using the given table meta info.