Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var TestSchemaTable = tabledef.TableDef{ DatasetId: "dataset_id", Description: "Table Def Description", TableId: "table_id", Name: "Friendly Name", PartitionTable: true, PartitionExpirationSeconds: 1337, Fields: []*tabledef.FieldSchema{ { Name: "A", Description: "The letter 'A'.", Type: tabledef.Type_STRING, }, { Name: "B", Description: "The letter 'B'.", Type: tabledef.Type_INTEGER, }, { Name: "C", Description: "The letter 'C'.", Type: tabledef.Type_FLOAT, }, { Name: "Desc", Description: "This is a description string.\nIt has a newline, ᴜɴɪᴄᴏᴅᴇ, and " + "multiple consecutive\t\t\t\tspaces. ", Type: tabledef.Type_STRING, IsRequired: true, }, { Name: "Req", Type: tabledef.Type_STRING, IsRequired: true, }, { Name: "legacy_date_time", Type: tabledef.Type_DATETIME, }, { Name: "Rec", Type: tabledef.Type_RECORD, IsRepeated: true, Schema: []*tabledef.FieldSchema{ { Name: "optional_field", Description: "This is an optional field.", Type: tabledef.Type_STRING, }, { Name: "required_field", Type: tabledef.Type_STRING, IsRequired: true, }, }, }, }, }
TestSchemaTable is a schema table used for testing.
Functions ¶
func NormalizeToInferredSchema ¶
func NormalizeToInferredSchema(schema []*tabledef.FieldSchema)
NormalizeToInferredSchema normalizes FieldSchema protobuf to the output produced by bigquery.InferSchema.
func SchemaFieldToProto ¶
func SchemaFieldToProto(field *bigquery.FieldSchema) *tabledef.FieldSchema
SchemaFieldToProto converts a single BigQuery FieldSchema value to a FieldSchema protobuf.
func SchemaToProto ¶
func SchemaToProto(schema bigquery.Schema) []*tabledef.FieldSchema
SchemaToProto converts a BigQuery Schema to a slice of FieldSchema protobufs.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.