Get an SCollection for a BigQuery SELECT query.
Get an SCollection for a BigQuery SELECT query.
Both Legacy SQL and
Standard SQL dialects are
supported. By default the query dialect will be automatically detected. To override this
behavior, start the query string with #legacysql
or #standardsql
.
Get an SCollection for a BigQuery table using the storage API.
Get an SCollection for a BigQuery table using the storage API.
names of the fields in the table that should be read. If empty, all fields will be read. If the specified field is a nested field, all the sub-fields in the field will be selected.
SQL text filtering statement, similar ti a WHERE clause in a query. Currently, we support combinations of predicates that are a comparison between a column and a constant value in SQL statement. Aggregates are not supported. For example:
"a > DATE '2014-09-27' AND (b > 5 AND c LIKE 'date')"
Get an SCollection for a BigQuery table.
Get an SCollection for a BigQuery TableRow JSON file.
Get a typed SCollection for a BigQuery SELECT query, table or storage.
Get a typed SCollection for a BigQuery SELECT query, table or storage.
Note that T
must be annotated with
BigQueryType.fromSchema,
BigQueryType.fromStorage,
BigQueryType.fromTable,
BigQueryType.fromQuery, or
BigQueryType.toTable.
By default the source (table or query) specified in the annotation will be used, but it can
be overridden with the newSource
parameter. For example:
@BigQueryType.fromTable("publicdata:samples.gsod") class Row // Read from [publicdata:samples.gsod] as specified in the annotation. sc.typedBigQuery[Row]() // Read from [myproject:samples.gsod] instead. sc.typedBigQuery[Row]("myproject:samples.gsod") // Read from a query instead. sc.typedBigQuery[Row]("SELECT * FROM [publicdata:samples.gsod] LIMIT 1000")
Both Legacy SQL and
Standard SQL dialects are
supported. By default the query dialect will be automatically detected. To override this
behavior, start the query string with #legacysql
or #standardsql
.
Get a typed SCollection for a BigQuery storage API.
Get a typed SCollection for a BigQuery storage API.
Note that T
must be annotated with
BigQueryType.fromStorage.
Similar to typedBigQuery but allows rowRestriction
to be overridden.
Get an SCollection for a BigQuery table.
Get an SCollection for a BigQuery table.
(Since version Scio 0.8) this method will be removed; use bigQueryTable(Table.Spec(table)) instead
Get an SCollection for a BigQuery table.
Get an SCollection for a BigQuery table.
(Since version Scio 0.8) this method will be removed; use bigQueryTable(Table.Ref(table)) instead
Enhanced version of ScioContext with BigQuery methods.