Class BigQueryUtils.SchemaConversionOptions

  • All Implemented Interfaces:
    java.io.Serializable
    Enclosing class:
    BigQueryUtils

    public abstract static class BigQueryUtils.SchemaConversionOptions
    extends java.lang.Object
    implements java.io.Serializable
    Options for how to convert BigQuery schemas to Beam schemas.
    See Also:
    Serialized Form
    • Constructor Detail

      • SchemaConversionOptions

        public SchemaConversionOptions()
    • Method Detail

      • 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.