Class BigQueryUtils.SchemaConversionOptions

java.lang.Object
org.apache.beam.sdk.io.gcp.bigquery.BigQueryUtils.SchemaConversionOptions
All Implemented Interfaces:
Serializable
Enclosing class:
BigQueryUtils

public abstract static class BigQueryUtils.SchemaConversionOptions extends Object implements Serializable
Options for how to convert BigQuery schemas to Beam schemas.
See Also:
  • Constructor Details

    • SchemaConversionOptions

      public SchemaConversionOptions()
  • Method Details

    • getInferMaps

      public abstract boolean getInferMaps()
      /** Controls whether to use the map or row FieldType for a TableSchema field that appears to represent a map (it is an array of structs containing only key and value fields).
    • getPicosecondTimestampMapping

      public abstract TimestampPrecision getPicosecondTimestampMapping()
      Controls how BigQuery TIMESTAMP(12) (picosecond precision) columns are mapped to Beam schema types.

      Standard TIMESTAMP(6) columns are mapped to FieldType.DATETIME, which only support up to millisecond precision. This option allows mapping TIMESTAMP(12) columns to logical types Timestamp.MILLIS, Timestamp.MICROS, Timestamp.NANOS or preserve full picosecond precision as a STRING type.

      This option has no effect on TIMESTAMP(6) (microsecond) columns.

      Defaults to TimestampPrecision.NANOS.

    • builder