Class TableRowToStorageApiProto
java.lang.Object
org.apache.beam.sdk.io.gcp.bigquery.TableRowToStorageApiProto
Utility methods for converting JSON 
TableRow objects to dynamic protocol message, for use
 with the Storage write API.- 
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classstatic class - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionstatic Descriptors.DescriptorgetDescriptorFromTableSchema(TableSchema jsonSchema, boolean respectRequired, boolean includeCdcColumns) static Descriptors.DescriptorgetDescriptorFromTableSchema(com.google.cloud.bigquery.storage.v1.TableSchema tableSchema, boolean respectRequired, boolean includeCdcColumns) Given a BigQuery TableSchema, returns a protocol-buffer Descriptor that can be used to write data using the BigQuery Storage API.static ObjectjsonValueFromMessageValue(Descriptors.FieldDescriptor fieldDescriptor, Object fieldValue, boolean expandRepeated, Predicate<String> includeField, String prefix) static DynamicMessagemessageFromMap(org.apache.beam.sdk.io.gcp.bigquery.TableRowToStorageApiProto.SchemaInformation schemaInformation, Descriptors.Descriptor descriptor, AbstractMap<String, Object> map, boolean ignoreUnknownValues, boolean allowMissingRequiredFields, @Nullable TableRow unknownFields, @Nullable String changeType, @Nullable String changeSequenceNum) static DynamicMessagemessageFromTableRow(org.apache.beam.sdk.io.gcp.bigquery.TableRowToStorageApiProto.SchemaInformation schemaInformation, Descriptors.Descriptor descriptor, TableRow tableRow, boolean ignoreUnknownValues, boolean allowMissingRequiredFields, @Nullable TableRow unknownFields, @Nullable String changeType, long changeSequenceNum) static DynamicMessagemessageFromTableRow(org.apache.beam.sdk.io.gcp.bigquery.TableRowToStorageApiProto.SchemaInformation schemaInformation, Descriptors.Descriptor descriptor, TableRow tableRow, boolean ignoreUnknownValues, boolean allowMissingRequiredFields, @Nullable TableRow unknownFields, @Nullable String changeType, @Nullable String changeSequenceNum) Given a BigQuery TableRow, returns a protocol-buffer message that can be used to write data using the BigQuery Storage API.static com.google.cloud.bigquery.storage.v1.TableFieldSchema.ModemodeToProtoMode(@Nullable String defaultValueExpression, String mode) static StringprotoModeToJsonMode(com.google.cloud.bigquery.storage.v1.TableFieldSchema.Mode protoMode) static TableSchemaprotoSchemaToTableSchema(com.google.cloud.bigquery.storage.v1.TableSchema protoTableSchema) static TableFieldSchemaprotoTableFieldToTableField(com.google.cloud.bigquery.storage.v1.TableFieldSchema protoTableField) static StringprotoTypeToJsonType(com.google.cloud.bigquery.storage.v1.TableFieldSchema.Type protoType) static com.google.cloud.bigquery.storage.v1.TableSchemaschemaToProtoTableSchema(TableSchema tableSchema) static com.google.cloud.bigquery.storage.v1.TableFieldSchemastatic TableRowtableRowFromMessage(Message message, boolean includeCdcColumns, Predicate<String> includeField) static TableRowtableRowFromMessage(Message message, boolean includeCdcColumns, Predicate<String> includeField, String namePrefix) static com.google.cloud.bigquery.storage.v1.TableFieldSchema.TypetypeToProtoType(String type) static Descriptors.DescriptorwrapDescriptorProto(DescriptorProtos.DescriptorProto descriptorProto)  
- 
Constructor Details
- 
TableRowToStorageApiProto
public TableRowToStorageApiProto() 
 - 
 - 
Method Details
- 
modeToProtoMode
 - 
protoModeToJsonMode
public static String protoModeToJsonMode(com.google.cloud.bigquery.storage.v1.TableFieldSchema.Mode protoMode)  - 
protoTypeToJsonType
public static String protoTypeToJsonType(com.google.cloud.bigquery.storage.v1.TableFieldSchema.Type protoType)  - 
typeToProtoType
public static com.google.cloud.bigquery.storage.v1.TableFieldSchema.Type typeToProtoType(String type)  - 
protoSchemaToTableSchema
public static TableSchema protoSchemaToTableSchema(com.google.cloud.bigquery.storage.v1.TableSchema protoTableSchema)  - 
protoTableFieldToTableField
public static TableFieldSchema protoTableFieldToTableField(com.google.cloud.bigquery.storage.v1.TableFieldSchema protoTableField)  - 
schemaToProtoTableSchema
public static com.google.cloud.bigquery.storage.v1.TableSchema schemaToProtoTableSchema(TableSchema tableSchema)  - 
tableFieldToProtoTableField
public static com.google.cloud.bigquery.storage.v1.TableFieldSchema tableFieldToProtoTableField(TableFieldSchema field)  - 
getDescriptorFromTableSchema
public static Descriptors.Descriptor getDescriptorFromTableSchema(TableSchema jsonSchema, boolean respectRequired, boolean includeCdcColumns) throws Descriptors.DescriptorValidationException  - 
getDescriptorFromTableSchema
public static Descriptors.Descriptor getDescriptorFromTableSchema(com.google.cloud.bigquery.storage.v1.TableSchema tableSchema, boolean respectRequired, boolean includeCdcColumns) throws Descriptors.DescriptorValidationException Given a BigQuery TableSchema, returns a protocol-buffer Descriptor that can be used to write data using the BigQuery Storage API. - 
wrapDescriptorProto
public static Descriptors.Descriptor wrapDescriptorProto(DescriptorProtos.DescriptorProto descriptorProto) throws Descriptors.DescriptorValidationException  - 
messageFromMap
public static DynamicMessage messageFromMap(org.apache.beam.sdk.io.gcp.bigquery.TableRowToStorageApiProto.SchemaInformation schemaInformation, Descriptors.Descriptor descriptor, AbstractMap<String, Object> map, boolean ignoreUnknownValues, boolean allowMissingRequiredFields, @Nullable TableRow unknownFields, @Nullable String changeType, @Nullable String changeSequenceNum) throws org.apache.beam.sdk.io.gcp.bigquery.TableRowToStorageApiProto.SchemaConversionException- Throws:
 org.apache.beam.sdk.io.gcp.bigquery.TableRowToStorageApiProto.SchemaConversionException
 - 
messageFromTableRow
public static DynamicMessage messageFromTableRow(org.apache.beam.sdk.io.gcp.bigquery.TableRowToStorageApiProto.SchemaInformation schemaInformation, Descriptors.Descriptor descriptor, TableRow tableRow, boolean ignoreUnknownValues, boolean allowMissingRequiredFields, @Nullable TableRow unknownFields, @Nullable String changeType, long changeSequenceNum) throws org.apache.beam.sdk.io.gcp.bigquery.TableRowToStorageApiProto.SchemaConversionException Forwards tomessageFromTableRow(SchemaInformation, Descriptor, TableRow, boolean, boolean, TableRow, String, String)viaLong.toHexString(long).- Throws:
 org.apache.beam.sdk.io.gcp.bigquery.TableRowToStorageApiProto.SchemaConversionException
 - 
messageFromTableRow
public static DynamicMessage messageFromTableRow(org.apache.beam.sdk.io.gcp.bigquery.TableRowToStorageApiProto.SchemaInformation schemaInformation, Descriptors.Descriptor descriptor, TableRow tableRow, boolean ignoreUnknownValues, boolean allowMissingRequiredFields, @Nullable TableRow unknownFields, @Nullable String changeType, @Nullable String changeSequenceNum) throws org.apache.beam.sdk.io.gcp.bigquery.TableRowToStorageApiProto.SchemaConversionException Given a BigQuery TableRow, returns a protocol-buffer message that can be used to write data using the BigQuery Storage API.- Throws:
 org.apache.beam.sdk.io.gcp.bigquery.TableRowToStorageApiProto.SchemaConversionException
 - 
tableRowFromMessage
 - 
tableRowFromMessage
 - 
jsonValueFromMessageValue
 
 -