package adapt
import "cloud.google.com/go/bigquery/storage/managedwriter/adapt"
Package adapt adds functionality related to converting bigquery representations like schema and data type representations.
It is EXPERIMENTAL and subject to change or removal without notice.
Index ¶
- func BQSchemaToStorageTableSchema(in bigquery.Schema) (*storagepb.TableSchema, error)
- func StorageSchemaToProto2Descriptor(inSchema *storagepb.TableSchema, scope string) (protoreflect.Descriptor, error)
- func StorageSchemaToProto3Descriptor(inSchema *storagepb.TableSchema, scope string) (protoreflect.Descriptor, error)
- func StorageTableSchemaToBQSchema(in *storagepb.TableSchema) (bigquery.Schema, error)
Functions ¶
func BQSchemaToStorageTableSchema ¶
func BQSchemaToStorageTableSchema(in bigquery.Schema) (*storagepb.TableSchema, error)
BQSchemaToStorageTableSchema converts a bigquery Schema into the protobuf-based TableSchema used by the BigQuery Storage WriteClient.
func StorageSchemaToProto2Descriptor ¶
func StorageSchemaToProto2Descriptor(inSchema *storagepb.TableSchema, scope string) (protoreflect.Descriptor, error)
StorageSchemaToProto2Descriptor builds a protoreflect.Descriptor for a given table schema using proto2 syntax.
func StorageSchemaToProto3Descriptor ¶
func StorageSchemaToProto3Descriptor(inSchema *storagepb.TableSchema, scope string) (protoreflect.Descriptor, error)
StorageSchemaToProto3Descriptor builds a protoreflect.Descriptor for a given table schema using proto3 syntax.
NOTE: Currently the write API doesn't yet support proto3 behaviors (default value, wrapper types, etc), but this is provided for completeness.
func StorageTableSchemaToBQSchema ¶
func StorageTableSchemaToBQSchema(in *storagepb.TableSchema) (bigquery.Schema, error)
StorageTableSchemaToBQSchema converts a TableSchema from the BigQuery Storage WriteClient into the equivalent BigQuery Schema.
Source Files ¶
doc.go error.go protoconversion.go schemaconversion.go
- Version
- v1.21.0
- Published
- Aug 17, 2021
- Platform
- js/wasm
- Imports
- 10 packages
- Last checked
- 35 minutes ago –
Tools for package owners.