public class TableRowToStorageApiProto
extends java.lang.Object
TableRow
objects to dynamic protocol message, for use
with the Storage write API.Modifier and Type | Class and Description |
---|---|
static class |
TableRowToStorageApiProto.SchemaConversionException |
static class |
TableRowToStorageApiProto.SchemaDoesntMatchException |
static class |
TableRowToStorageApiProto.SchemaTooNarrowException |
Constructor and Description |
---|
TableRowToStorageApiProto() |
Modifier and Type | Method and Description |
---|---|
static Descriptors.Descriptor |
getDescriptorFromTableSchema(TableSchema jsonSchema,
boolean respectRequired) |
static Descriptors.Descriptor |
getDescriptorFromTableSchema(com.google.cloud.bigquery.storage.v1.TableSchema tableSchema,
boolean respectRequired)
Given a BigQuery TableSchema, returns a protocol-buffer Descriptor that can be used to write
data using the BigQuery Storage API.
|
static java.lang.Object |
jsonValueFromMessageValue(Descriptors.FieldDescriptor fieldDescriptor,
java.lang.Object fieldValue,
boolean expandRepeated) |
static DynamicMessage |
messageFromMap(org.apache.beam.sdk.io.gcp.bigquery.TableRowToStorageApiProto.SchemaInformation schemaInformation,
Descriptors.Descriptor descriptor,
java.util.AbstractMap<java.lang.String,java.lang.Object> map,
boolean ignoreUnknownValues) |
static DynamicMessage |
messageFromTableRow(org.apache.beam.sdk.io.gcp.bigquery.TableRowToStorageApiProto.SchemaInformation schemaInformation,
Descriptors.Descriptor descriptor,
TableRow tableRow,
boolean ignoreUnknownValues)
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.Mode |
modeToProtoMode(java.lang.String mode) |
static java.lang.String |
protoModeToJsonMode(com.google.cloud.bigquery.storage.v1.TableFieldSchema.Mode protoMode) |
static TableSchema |
protoSchemaToTableSchema(com.google.cloud.bigquery.storage.v1.TableSchema protoTableSchema) |
static TableFieldSchema |
protoTableFieldToTableField(com.google.cloud.bigquery.storage.v1.TableFieldSchema protoTableField) |
static java.lang.String |
protoTypeToJsonType(com.google.cloud.bigquery.storage.v1.TableFieldSchema.Type protoType) |
static com.google.cloud.bigquery.storage.v1.TableSchema |
schemaToProtoTableSchema(TableSchema tableSchema) |
static com.google.cloud.bigquery.storage.v1.TableFieldSchema |
tableFieldToProtoTableField(TableFieldSchema field) |
static TableRow |
tableRowFromMessage(Message message) |
static com.google.cloud.bigquery.storage.v1.TableFieldSchema.Type |
typeToProtoType(java.lang.String type) |
public static com.google.cloud.bigquery.storage.v1.TableFieldSchema.Mode modeToProtoMode(java.lang.String mode)
public static java.lang.String protoModeToJsonMode(com.google.cloud.bigquery.storage.v1.TableFieldSchema.Mode protoMode)
public static java.lang.String protoTypeToJsonType(com.google.cloud.bigquery.storage.v1.TableFieldSchema.Type protoType)
public static com.google.cloud.bigquery.storage.v1.TableFieldSchema.Type typeToProtoType(java.lang.String type)
public static TableSchema protoSchemaToTableSchema(com.google.cloud.bigquery.storage.v1.TableSchema protoTableSchema)
public static TableFieldSchema protoTableFieldToTableField(com.google.cloud.bigquery.storage.v1.TableFieldSchema protoTableField)
public static com.google.cloud.bigquery.storage.v1.TableSchema schemaToProtoTableSchema(TableSchema tableSchema)
public static com.google.cloud.bigquery.storage.v1.TableFieldSchema tableFieldToProtoTableField(TableFieldSchema field)
public static Descriptors.Descriptor getDescriptorFromTableSchema(TableSchema jsonSchema, boolean respectRequired) throws Descriptors.DescriptorValidationException
public static Descriptors.Descriptor getDescriptorFromTableSchema(com.google.cloud.bigquery.storage.v1.TableSchema tableSchema, boolean respectRequired) throws Descriptors.DescriptorValidationException
public static DynamicMessage messageFromMap(org.apache.beam.sdk.io.gcp.bigquery.TableRowToStorageApiProto.SchemaInformation schemaInformation, Descriptors.Descriptor descriptor, java.util.AbstractMap<java.lang.String,java.lang.Object> map, boolean ignoreUnknownValues) throws TableRowToStorageApiProto.SchemaConversionException
public static DynamicMessage messageFromTableRow(org.apache.beam.sdk.io.gcp.bigquery.TableRowToStorageApiProto.SchemaInformation schemaInformation, Descriptors.Descriptor descriptor, TableRow tableRow, boolean ignoreUnknownValues) throws TableRowToStorageApiProto.SchemaConversionException
public static java.lang.Object jsonValueFromMessageValue(Descriptors.FieldDescriptor fieldDescriptor, java.lang.Object fieldValue, boolean expandRepeated)