@Internal @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 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 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, getTablesclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetSubProvider, getSubProviders, getTablepublic java.lang.String getTableType()
TableProviderpublic BeamSqlTable buildBeamSqlTable(Table table)
TableProviderBeamSqlTable using the given table meta info.