public static class BigQueryIO.Read
extends org.apache.beam.sdk.transforms.PTransform<org.apache.beam.sdk.values.PBegin,org.apache.beam.sdk.values.PCollection<com.google.api.services.bigquery.model.TableRow>>
BigQueryIO.read().| Modifier and Type | Method and Description |
|---|---|
org.apache.beam.sdk.values.PCollection<com.google.api.services.bigquery.model.TableRow> |
expand(org.apache.beam.sdk.values.PBegin input) |
BigQueryIO.Read |
from(java.lang.String tableSpec)
Reads a BigQuery table specified as
"[project_id]:[dataset_id].[table_id]" or "[dataset_id].[table_id]" for tables within the current project. |
BigQueryIO.Read |
from(com.google.api.services.bigquery.model.TableReference table)
Read from table specified by a
TableReference. |
BigQueryIO.Read |
from(org.apache.beam.sdk.options.ValueProvider<java.lang.String> tableSpec)
Same as
from(String), but with a ValueProvider. |
BigQueryIO.Read |
fromQuery(java.lang.String query)
Reads results received after executing the given query.
|
BigQueryIO.Read |
fromQuery(org.apache.beam.sdk.options.ValueProvider<java.lang.String> query)
Same as
fromQuery(String), but with a ValueProvider. |
com.google.api.services.bigquery.model.TableReference |
getTable()
Returns the table to read, or
null if reading from a query instead. |
org.apache.beam.sdk.options.ValueProvider<com.google.api.services.bigquery.model.TableReference> |
getTableProvider()
Returns the table to read, or
null if reading from a query instead. |
void |
populateDisplayData(org.apache.beam.sdk.transforms.display.DisplayData.Builder builder) |
BigQueryIO.Read |
usingStandardSql()
Enables BigQuery's Standard SQL dialect when reading from a query.
|
BigQueryIO.Read |
withoutResultFlattening()
Disable flattening of
query results.
|
BigQueryIO.Read |
withoutValidation()
Disable validation that the table exists or the query succeeds prior to pipeline submission.
|
BigQueryIO.Read |
withTemplateCompatibility()
Use new template-compatible source implementation.
|
public org.apache.beam.sdk.values.PCollection<com.google.api.services.bigquery.model.TableRow> expand(org.apache.beam.sdk.values.PBegin input)
expand in class org.apache.beam.sdk.transforms.PTransform<org.apache.beam.sdk.values.PBegin,org.apache.beam.sdk.values.PCollection<com.google.api.services.bigquery.model.TableRow>>public void populateDisplayData(org.apache.beam.sdk.transforms.display.DisplayData.Builder builder)
populateDisplayData in interface org.apache.beam.sdk.transforms.display.HasDisplayDatapopulateDisplayData in class org.apache.beam.sdk.transforms.PTransform<org.apache.beam.sdk.values.PBegin,org.apache.beam.sdk.values.PCollection<com.google.api.services.bigquery.model.TableRow>>@Nullable public org.apache.beam.sdk.options.ValueProvider<com.google.api.services.bigquery.model.TableReference> getTableProvider()
null if reading from a query instead.@Nullable public com.google.api.services.bigquery.model.TableReference getTable()
null if reading from a query instead.public BigQueryIO.Read from(java.lang.String tableSpec)
"[project_id]:[dataset_id].[table_id]" or "[dataset_id].[table_id]" for tables within the current project.public BigQueryIO.Read from(org.apache.beam.sdk.options.ValueProvider<java.lang.String> tableSpec)
from(String), but with a ValueProvider.public BigQueryIO.Read from(com.google.api.services.bigquery.model.TableReference table)
TableReference.public BigQueryIO.Read fromQuery(java.lang.String 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().
public BigQueryIO.Read fromQuery(org.apache.beam.sdk.options.ValueProvider<java.lang.String> query)
fromQuery(String), but with a ValueProvider.public BigQueryIO.Read withoutValidation()
public BigQueryIO.Read 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 BigQueryIO.Read usingStandardSql()
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 BigQueryIO.Read withTemplateCompatibility()
Use new template-compatible source implementation. This implementation is compatible with repeated template invocations. It does not support dynamic work rebalancing.