Class UpgradeTableSchema


  • public class UpgradeTableSchema
    extends java.lang.Object
    Helper functions for SchemaUpdateOptions.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static com.google.cloud.bigquery.storage.v1.TableSchema getIncrementalSchema​(TableRowToStorageApiProto.ErrorCollector errorCollector, com.google.cloud.bigquery.storage.v1.TableSchema oldSchema)
      Given a list of schema errors, generate a new schema that represents the minimal changes needed to the schema in order to validate the new record.
      static boolean isPayloadSchemaOutOfDate​(StorageApiWritePayload payload, org.apache.beam.sdk.util.ThrowingSupplier<byte[]> schemaHash, org.apache.beam.sdk.util.ThrowingSupplier<com.google.protobuf.Descriptors.Descriptor> schemaDescriptor)  
      static com.google.cloud.bigquery.storage.v1.TableSchema mergeSchemas​(com.google.cloud.bigquery.storage.v1.TableSchema schema1, com.google.cloud.bigquery.storage.v1.TableSchema schema2)  
      static TableRowToStorageApiProto.ErrorCollector newErrorCollector()  
      • Methods inherited from class java.lang.Object

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

      • UpgradeTableSchema

        public UpgradeTableSchema()
    • Method Detail

      • mergeSchemas

        public static com.google.cloud.bigquery.storage.v1.TableSchema mergeSchemas​(com.google.cloud.bigquery.storage.v1.TableSchema schema1,
                                                                                    com.google.cloud.bigquery.storage.v1.TableSchema schema2)
      • isPayloadSchemaOutOfDate

        public static boolean isPayloadSchemaOutOfDate​(StorageApiWritePayload payload,
                                                       org.apache.beam.sdk.util.ThrowingSupplier<byte[]> schemaHash,
                                                       org.apache.beam.sdk.util.ThrowingSupplier<com.google.protobuf.Descriptors.Descriptor> schemaDescriptor)
                                                throws java.lang.Exception
        Throws:
        java.lang.Exception