Class BigQuerySchemaIOProvider

  • All Implemented Interfaces:
    org.apache.beam.sdk.schemas.io.SchemaIOProvider

    @Internal
    @Experimental
    @AutoService(org.apache.beam.sdk.schemas.io.SchemaIOProvider.class)
    public class BigQuerySchemaIOProvider
    extends java.lang.Object
    implements org.apache.beam.sdk.schemas.io.SchemaIOProvider
    An implementation of SchemaIOProvider for reading and writing to BigQuery with BigQueryIO. For a description of configuration options and other defaults, see configurationSchema().

    This transform is still experimental, and is still subject to breaking changes.

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.apache.beam.sdk.schemas.Schema configurationSchema()
      Returns the expected schema of the configuration object.
      org.apache.beam.sdk.io.gcp.bigquery.BigQuerySchemaIOProvider.BigQuerySchemaIO from​(java.lang.String location, org.apache.beam.sdk.values.Row configuration, @Nullable org.apache.beam.sdk.schemas.Schema dataSchema)
      Produces a SchemaIO given a String representing the data's location, the schema of the data that resides there, and some IO-specific configuration object.
      java.lang.String identifier()
      Returns an id that uniquely represents this IO.
      org.apache.beam.sdk.values.PCollection.IsBounded isBounded()
      Indicates whether the PCollections produced by this transform will contain a bounded or unbounded number of elements.
      boolean requiresDataSchema()
      Indicates whether this transform requires a specified data schema.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • BigQuerySchemaIOProvider

        public BigQuerySchemaIOProvider()
    • Method Detail

      • identifier

        public java.lang.String identifier()
        Returns an id that uniquely represents this IO.
        Specified by:
        identifier in interface org.apache.beam.sdk.schemas.io.SchemaIOProvider
      • from

        public org.apache.beam.sdk.io.gcp.bigquery.BigQuerySchemaIOProvider.BigQuerySchemaIO from​(java.lang.String location,
                                                                                                  org.apache.beam.sdk.values.Row configuration,
                                                                                                  @Nullable org.apache.beam.sdk.schemas.Schema dataSchema)
        Produces a SchemaIO given a String representing the data's location, the schema of the data that resides there, and some IO-specific configuration object.

        For BigQuery IO, only the configuration object is used. Location and data schema have no effect. Specifying a table and dataset is done through appropriate fields in the configuration object, and the data schema is automatically generated from either the input PCollection or schema of the BigQuery table.

        Specified by:
        from in interface org.apache.beam.sdk.schemas.io.SchemaIOProvider
      • requiresDataSchema

        public boolean requiresDataSchema()
        Indicates whether this transform requires a specified data schema.
        Specified by:
        requiresDataSchema in interface org.apache.beam.sdk.schemas.io.SchemaIOProvider
        Returns:
        false
      • isBounded

        public org.apache.beam.sdk.values.PCollection.IsBounded isBounded()
        Indicates whether the PCollections produced by this transform will contain a bounded or unbounded number of elements.
        Specified by:
        isBounded in interface org.apache.beam.sdk.schemas.io.SchemaIOProvider
        Returns:
        Bounded