Class BigQueryIO.Read
- All Implemented Interfaces:
Serializable
,HasDisplayData
- Enclosing class:
BigQueryIO
BigQueryIO.read()
.- See Also:
-
Field Summary
Fields inherited from class org.apache.beam.sdk.transforms.PTransform
annotations, displayData, name, resourceHints
-
Method Summary
Modifier and TypeMethodDescriptionOverride this method to specify how thisPTransform
should be expanded on the givenInputT
.from
(TableReference table) Read from table specified by aTableReference
.Reads a BigQuery table specified as"[project_id]:[dataset_id].[table_id]"
or"[dataset_id].[table_id]"
for tables within the current project.from
(ValueProvider<String> tableSpec) Same asfrom(String)
, but with aValueProvider
.Reads results received after executing the given query.fromQuery
(ValueProvider<String> query) Same asfromQuery(String)
, but with aValueProvider
.getTable()
Returns the table to read, ornull
if reading from a query instead.Returns the table to read, ornull
if reading from a query instead.void
populateDisplayData
(DisplayData.Builder builder) Register display data for the given transform or component.Enables BigQuery's Standard SQL dialect when reading from a query.Disable flattening of query results.Disable validation that the table exists or the query succeeds prior to pipeline submission.Use new template-compatible source implementation.withTestServices
(BigQueryServices testServices) Methods inherited from class org.apache.beam.sdk.transforms.PTransform
addAnnotation, compose, compose, getAdditionalInputs, getAnnotations, getDefaultOutputCoder, getDefaultOutputCoder, getDefaultOutputCoder, getKindString, getName, getResourceHints, setDisplayData, setResourceHints, toString, validate, validate
-
Method Details
-
expand
Description copied from class:PTransform
Override this method to specify how thisPTransform
should be expanded on the givenInputT
.NOTE: This method should not be called directly. Instead apply the
PTransform
should be applied to theInputT
using theapply
method.Composite transforms, which are defined in terms of other transforms, should return the output of one of the composed transforms. Non-composite transforms, which do not apply any transforms internally, should return a new unbound output and register evaluators (via backend-specific registration methods).
- Specified by:
expand
in classPTransform<PBegin,
PCollection<TableRow>>
-
populateDisplayData
Description copied from class:PTransform
Register display data for the given transform or component.populateDisplayData(DisplayData.Builder)
is invoked by Pipeline runners to collect display data viaDisplayData.from(HasDisplayData)
. Implementations may callsuper.populateDisplayData(builder)
in order to register display data in the current namespace, but should otherwise usesubcomponent.populateDisplayData(builder)
to use the namespace of the subcomponent.By default, does not register any display data. Implementors may override this method to provide their own display data.
- Specified by:
populateDisplayData
in interfaceHasDisplayData
- Overrides:
populateDisplayData
in classPTransform<PBegin,
PCollection<TableRow>> - Parameters:
builder
- The builder to populate with display data.- See Also:
-
withTestServices
-
getTableProvider
Returns the table to read, ornull
if reading from a query instead. -
getTable
Returns the table to read, ornull
if reading from a query instead. -
from
Reads a BigQuery table specified as"[project_id]:[dataset_id].[table_id]"
or"[dataset_id].[table_id]"
for tables within the current project. -
from
Same asfrom(String)
, but with aValueProvider
. -
from
Read from table specified by aTableReference
. -
fromQuery
Reads results received after executing the given query.By default, the query results will be flattened -- see "flattenResults" in the Jobs documentation for more information. To disable flattening, use
withoutResultFlattening()
.By default, the query will use BigQuery's legacy SQL dialect. To use the BigQuery Standard SQL dialect, use
usingStandardSql()
. -
fromQuery
Same asfromQuery(String)
, but with aValueProvider
. -
withoutValidation
Disable validation that the table exists or the query succeeds prior to pipeline submission. Basic validation (such as ensuring that a query or table is specified) still occurs. -
withoutResultFlattening
Disable flattening of query results.Only valid when a query is used (
fromQuery(java.lang.String)
). Setting this option when reading from a table will cause an error during validation. -
usingStandardSql
Enables BigQuery's Standard SQL dialect when reading from a query.Only valid when a query is used (
fromQuery(java.lang.String)
). Setting this option when reading from a table will cause an error during validation. -
withTemplateCompatibility
Use new template-compatible source implementation.Use new template-compatible source implementation. This implementation is compatible with repeated template invocations. It does not support dynamic work rebalancing.
-