public static class BigQueryIO.Read.Bound extends PTransform<PInput,PCollection<TableRow>>
name| Modifier and Type | Method and Description |
|---|---|
PCollection<TableRow> |
apply(PInput input)
Applies this
PTransform on the given InputT, and returns its
Output. |
BigQueryIO.Read.Bound |
from(String tableSpec)
Returns a copy of this transform that reads from the specified table.
|
BigQueryIO.Read.Bound |
from(TableReference table)
Returns a copy of this transform that reads from the specified table.
|
BigQueryIO.Read.Bound |
fromQuery(String query)
Returns a copy of this transform that reads the results of the specified query.
|
protected Coder<TableRow> |
getDefaultOutputCoder()
Returns the default
Coder to use for the output of this
single-output PTransform. |
Boolean |
getFlattenResults()
Returns true/false if result flattening is enabled/disabled, or null if not applicable.
|
String |
getQuery()
Returns the query to be read, or
null if reading from a table instead. |
TableReference |
getTable()
Returns the table to write, or
null if reading from a query instead. |
boolean |
getValidate()
Returns true if table validation is enabled.
|
BigQueryIO.Read.Bound |
named(String name)
Returns a copy of this transform using the name associated with this transformation.
|
void |
validate(PInput input)
Validates the current
PTransform. |
BigQueryIO.Read.Bound |
withoutResultFlattening()
Disable
flattening of query results.
|
BigQueryIO.Read.Bound |
withoutValidation()
Disable table validation.
|
getDefaultOutputCoder, getDefaultOutputCoder, getKindString, getName, populateDisplayData, toStringpublic BigQueryIO.Read.Bound named(String name)
Does not modify this object.
public BigQueryIO.Read.Bound from(String tableSpec)
BigQueryIO.parseTableSpec(String) for the specification format.
Does not modify this object.
public BigQueryIO.Read.Bound from(TableReference table)
Does not modify this object.
public BigQueryIO.Read.Bound fromQuery(String query)
Does not modify this object.
By default, the query results will be flattened -- see
"flattenResults" in the
Jobs documentation for more information. To disable flattening, use
withoutResultFlattening().
public BigQueryIO.Read.Bound withoutValidation()
public BigQueryIO.Read.Bound withoutResultFlattening()
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.
public void validate(PInput input)
PTransform.validate in class PTransform<PInput,PCollection<TableRow>>public PCollection<TableRow> apply(PInput input)
PTransformPTransform on the given InputT, and returns its
Output.
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).
The default implementation throws an exception. A derived class must
either implement apply, or else each runner must supply a custom
implementation via
PipelineRunner.apply(com.google.cloud.dataflow.sdk.transforms.PTransform<InputT, OutputT>, InputT).
apply in class PTransform<PInput,PCollection<TableRow>>protected Coder<TableRow> getDefaultOutputCoder()
PTransformCoder to use for the output of this
single-output PTransform.
By default, always throws
getDefaultOutputCoder in class PTransform<PInput,PCollection<TableRow>>public TableReference getTable()
null if reading from a query instead.public String getQuery()
null if reading from a table instead.public boolean getValidate()
public Boolean getFlattenResults()