Documentation ¶
Index ¶
- Variables
- func BQSchema(fields []*FieldSchema) bigquery.Schema
- type FieldSchema
- func (*FieldSchema) Descriptor() ([]byte, []int)
- func (m *FieldSchema) GetDescription() string
- func (m *FieldSchema) GetIsRepeated() bool
- func (m *FieldSchema) GetIsRequired() bool
- func (m *FieldSchema) GetName() string
- func (m *FieldSchema) GetSchema() []*FieldSchema
- func (m *FieldSchema) GetType() Type
- func (*FieldSchema) ProtoMessage()
- func (m *FieldSchema) Reset()
- func (m *FieldSchema) String() string
- func (m *FieldSchema) XXX_DiscardUnknown()
- func (m *FieldSchema) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *FieldSchema) XXX_Merge(src proto.Message)
- func (m *FieldSchema) XXX_Size() int
- func (m *FieldSchema) XXX_Unmarshal(b []byte) error
- type TableDef
- func (*TableDef) Descriptor() ([]byte, []int)
- func (m *TableDef) GetDatasetId() string
- func (m *TableDef) GetDescription() string
- func (m *TableDef) GetFields() []*FieldSchema
- func (m *TableDef) GetName() string
- func (m *TableDef) GetPartitionExpirationSeconds() int64
- func (m *TableDef) GetPartitionTable() bool
- func (m *TableDef) GetTableId() string
- func (*TableDef) ProtoMessage()
- func (m *TableDef) Reset()
- func (m *TableDef) String() string
- func (m *TableDef) XXX_DiscardUnknown()
- func (m *TableDef) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *TableDef) XXX_Merge(src proto.Message)
- func (m *TableDef) XXX_Size() int
- func (m *TableDef) XXX_Unmarshal(b []byte) error
- type Type
Constants ¶
This section is empty.
Variables ¶
View Source
var Type_name = map[int32]string{
0: "STRING",
1: "BYTES",
2: "INTEGER",
3: "FLOAT",
4: "BOOLEAN",
5: "TIMESTAMP",
6: "RECORD",
7: "DATE",
8: "TIME",
9: "DATETIME",
}
View Source
var Type_value = map[string]int32{
"STRING": 0,
"BYTES": 1,
"INTEGER": 2,
"FLOAT": 3,
"BOOLEAN": 4,
"TIMESTAMP": 5,
"RECORD": 6,
"DATE": 7,
"TIME": 8,
"DATETIME": 9,
}
Functions ¶
func BQSchema ¶
func BQSchema(fields []*FieldSchema) bigquery.Schema
BQSchema constructs a bigquery.Schema from a []*TableDef.FieldSchema
Types ¶
type FieldSchema ¶
type FieldSchema struct { // Name of the field/column. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // Human-readable description of the field. (optional) Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` IsRepeated bool `protobuf:"varint,3,opt,name=is_repeated,json=isRepeated,proto3" json:"is_repeated,omitempty"` IsRequired bool `protobuf:"varint,4,opt,name=is_required,json=isRequired,proto3" json:"is_required,omitempty"` Type Type `protobuf:"varint,5,opt,name=type,proto3,enum=tabledef.Type" json:"type,omitempty"` Schema []*FieldSchema `protobuf:"bytes,6,rep,name=schema,proto3" json:"schema,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*FieldSchema) Descriptor ¶
func (*FieldSchema) Descriptor() ([]byte, []int)
func (*FieldSchema) GetDescription ¶
func (m *FieldSchema) GetDescription() string
func (*FieldSchema) GetIsRepeated ¶
func (m *FieldSchema) GetIsRepeated() bool
func (*FieldSchema) GetIsRequired ¶
func (m *FieldSchema) GetIsRequired() bool
func (*FieldSchema) GetName ¶
func (m *FieldSchema) GetName() string
func (*FieldSchema) GetSchema ¶
func (m *FieldSchema) GetSchema() []*FieldSchema
func (*FieldSchema) GetType ¶
func (m *FieldSchema) GetType() Type
func (*FieldSchema) ProtoMessage ¶
func (*FieldSchema) ProtoMessage()
func (*FieldSchema) Reset ¶
func (m *FieldSchema) Reset()
func (*FieldSchema) String ¶
func (m *FieldSchema) String() string
func (*FieldSchema) XXX_DiscardUnknown ¶
func (m *FieldSchema) XXX_DiscardUnknown()
func (*FieldSchema) XXX_Marshal ¶
func (m *FieldSchema) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*FieldSchema) XXX_Merge ¶
func (m *FieldSchema) XXX_Merge(src proto.Message)
func (*FieldSchema) XXX_Size ¶
func (m *FieldSchema) XXX_Size() int
func (*FieldSchema) XXX_Unmarshal ¶
func (m *FieldSchema) XXX_Unmarshal(b []byte) error
type TableDef ¶
type TableDef struct { // Name of the dataset. DatasetId string `protobuf:"bytes,1,opt,name=dataset_id,json=datasetId,proto3" json:"dataset_id,omitempty"` // Name of the table. TableId string `protobuf:"bytes,2,opt,name=table_id,json=tableId,proto3" json:"table_id,omitempty"` // Human-readable name of the table. (optional) Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` // Human-readable description of the table. (optional) Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"` Fields []*FieldSchema `protobuf:"bytes,5,rep,name=fields,proto3" json:"fields,omitempty"` // Whether to partition the table by day. PartitionTable bool `protobuf:"varint,6,opt,name=partition_table,json=partitionTable,proto3" json:"partition_table,omitempty"` // The lifetime for each partition. If zero, partitions do not expire. // Ignored if partition_table is false. (optional) PartitionExpirationSeconds int64 `` /* 142-byte string literal not displayed */ XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*TableDef) Descriptor ¶
func (*TableDef) GetDatasetId ¶
func (*TableDef) GetDescription ¶
func (*TableDef) GetFields ¶
func (m *TableDef) GetFields() []*FieldSchema
func (*TableDef) GetPartitionExpirationSeconds ¶
func (*TableDef) GetPartitionTable ¶
func (*TableDef) GetTableId ¶
func (*TableDef) ProtoMessage ¶
func (*TableDef) ProtoMessage()
func (*TableDef) XXX_DiscardUnknown ¶
func (m *TableDef) XXX_DiscardUnknown()
func (*TableDef) XXX_Marshal ¶
func (*TableDef) XXX_Unmarshal ¶
Click to show internal directories.
Click to hide internal directories.