Class BigQueryIO.Read
- java.lang.Object
-
- 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>>
-
- org.apache.beam.sdk.io.gcp.bigquery.BigQueryIO.Read
-
- All Implemented Interfaces:
java.io.Serializable,org.apache.beam.sdk.transforms.display.HasDisplayData
- Enclosing class:
- BigQueryIO
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>>Implementation ofBigQueryIO.read().- See Also:
- Serialized Form
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.beam.sdk.values.PCollection<com.google.api.services.bigquery.model.TableRow>expand(org.apache.beam.sdk.values.PBegin input)BigQueryIO.Readfrom(com.google.api.services.bigquery.model.TableReference table)Read from table specified by aTableReference.BigQueryIO.Readfrom(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.Readfrom(org.apache.beam.sdk.options.ValueProvider<java.lang.String> tableSpec)Same asfrom(String), but with aValueProvider.BigQueryIO.ReadfromQuery(java.lang.String query)Reads results received after executing the given query.BigQueryIO.ReadfromQuery(org.apache.beam.sdk.options.ValueProvider<java.lang.String> query)Same asfromQuery(String), but with aValueProvider.@Nullable com.google.api.services.bigquery.model.TableReferencegetTable()Returns the table to read, ornullif reading from a query instead.@Nullable org.apache.beam.sdk.options.ValueProvider<com.google.api.services.bigquery.model.TableReference>getTableProvider()Returns the table to read, ornullif reading from a query instead.voidpopulateDisplayData(org.apache.beam.sdk.transforms.display.DisplayData.Builder builder)BigQueryIO.ReadusingStandardSql()Enables BigQuery's Standard SQL dialect when reading from a query.BigQueryIO.ReadwithoutResultFlattening()Disable flattening of query results.BigQueryIO.ReadwithoutValidation()Disable validation that the table exists or the query succeeds prior to pipeline submission.BigQueryIO.ReadwithTemplateCompatibility()Use new template-compatible source implementation.BigQueryIO.ReadwithTestServices(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 Detail
-
expand
public org.apache.beam.sdk.values.PCollection<com.google.api.services.bigquery.model.TableRow> expand(org.apache.beam.sdk.values.PBegin input)
- Specified by:
expandin classorg.apache.beam.sdk.transforms.PTransform<org.apache.beam.sdk.values.PBegin,org.apache.beam.sdk.values.PCollection<com.google.api.services.bigquery.model.TableRow>>
-
populateDisplayData
public void populateDisplayData(org.apache.beam.sdk.transforms.display.DisplayData.Builder builder)
- Specified by:
populateDisplayDatain interfaceorg.apache.beam.sdk.transforms.display.HasDisplayData- Overrides:
populateDisplayDatain classorg.apache.beam.sdk.transforms.PTransform<org.apache.beam.sdk.values.PBegin,org.apache.beam.sdk.values.PCollection<com.google.api.services.bigquery.model.TableRow>>
-
withTestServices
public BigQueryIO.Read withTestServices(BigQueryServices testServices)
-
getTableProvider
public @Nullable org.apache.beam.sdk.options.ValueProvider<com.google.api.services.bigquery.model.TableReference> getTableProvider()
Returns the table to read, ornullif reading from a query instead.
-
getTable
public @Nullable com.google.api.services.bigquery.model.TableReference getTable()
Returns the table to read, ornullif reading from a query instead.
-
from
public 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.
-
from
public BigQueryIO.Read from(org.apache.beam.sdk.options.ValueProvider<java.lang.String> tableSpec)
Same asfrom(String), but with aValueProvider.
-
from
public BigQueryIO.Read from(com.google.api.services.bigquery.model.TableReference table)
Read from table specified by aTableReference.
-
fromQuery
public BigQueryIO.Read fromQuery(java.lang.String query)
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
public BigQueryIO.Read fromQuery(org.apache.beam.sdk.options.ValueProvider<java.lang.String> query)
Same asfromQuery(String), but with aValueProvider.
-
withoutValidation
public BigQueryIO.Read 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
public BigQueryIO.Read 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
public BigQueryIO.Read 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
public BigQueryIO.Read 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.
-
-