From 8091890f4fd7dcf64d1afa3a598d46c9989fd714 Mon Sep 17 00:00:00 2001 From: Chris Date: Fri, 27 Jan 2023 11:36:17 -0700 Subject: [PATCH] BQ doesn't support partition by value --- bq_field.proto | 3 --- protos/bq_field.pb.go | 36 ++++++++++++------------------------ 2 files changed, 12 insertions(+), 27 deletions(-) diff --git a/bq_field.proto b/bq_field.proto index 944a623..5fa5d5f 100644 --- a/bq_field.proto +++ b/bq_field.proto @@ -59,9 +59,6 @@ message BigQueryFieldOptions { // What time period to partition this table by (can only be used on one field, options are "HOUR", "DAY", "MONTH", "YEAR") string time_partition_type = 24; - - // Whether to add partition to this table by this value - bool partition_by_value= 25; } diff --git a/protos/bq_field.pb.go b/protos/bq_field.pb.go index 1349569..123e2f2 100644 --- a/protos/bq_field.pb.go +++ b/protos/bq_field.pb.go @@ -68,8 +68,6 @@ type BigQueryFieldOptions struct { Materialize bool `protobuf:"varint,23,opt,name=materialize,proto3" json:"materialize,omitempty"` // What time period to partition this table by (can only be used on one field, options are "HOUR", "DAY", "MONTH", "YEAR") TimePartitionType string `protobuf:"bytes,24,opt,name=time_partition_type,json=timePartitionType,proto3" json:"time_partition_type,omitempty"` - // Whether to add partition to this table by this value - PartitionByValue bool `protobuf:"varint,25,opt,name=partition_by_value,json=partitionByValue,proto3" json:"partition_by_value,omitempty"` } func (x *BigQueryFieldOptions) Reset() { @@ -181,13 +179,6 @@ func (x *BigQueryFieldOptions) GetTimePartitionType() string { return "" } -func (x *BigQueryFieldOptions) GetPartitionByValue() bool { - if x != nil { - return x.PartitionByValue - } - return false -} - var file_bq_field_proto_extTypes = []protoimpl.ExtensionInfo{ { ExtendedType: (*descriptorpb.FieldOptions)(nil), @@ -214,7 +205,7 @@ var file_bq_field_proto_rawDesc = []byte{ 0x12, 0x0d, 0x67, 0x65, 0x6e, 0x5f, 0x62, 0x71, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x22, 0xd3, 0x03, 0x0a, 0x14, 0x42, 0x69, 0x67, 0x51, 0x75, 0x65, 0x72, 0x79, 0x46, 0x69, + 0x6f, 0x22, 0xa5, 0x03, 0x0a, 0x14, 0x42, 0x69, 0x67, 0x51, 0x75, 0x65, 0x72, 0x79, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x6f, 0x76, 0x65, @@ -240,20 +231,17 @@ var file_bq_field_proto_rawDesc = []byte{ 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x12, 0x2e, 0x0a, 0x13, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x18, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x74, 0x69, 0x6d, 0x65, 0x50, 0x61, 0x72, 0x74, - 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x2c, 0x0a, 0x12, 0x70, 0x61, 0x72, - 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x62, 0x79, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, - 0x19, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, - 0x42, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x5f, 0x0a, 0x08, 0x62, 0x69, 0x67, 0x71, 0x75, - 0x65, 0x72, 0x79, 0x12, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x18, 0xfd, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x67, 0x65, 0x6e, 0x5f, - 0x62, 0x71, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x42, 0x69, 0x67, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x08, - 0x62, 0x69, 0x67, 0x71, 0x75, 0x65, 0x72, 0x79, 0x42, 0x2f, 0x5a, 0x2d, 0x67, 0x69, 0x74, 0x68, - 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x68, 0x72, 0x65, 0x64, 0x73, 0x2f, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x62, 0x71, 0x2d, 0x73, 0x63, 0x68, 0x65, - 0x6d, 0x61, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x3a, 0x5f, 0x0a, 0x08, 0x62, 0x69, 0x67, + 0x71, 0x75, 0x65, 0x72, 0x79, 0x12, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xfd, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x67, 0x65, + 0x6e, 0x5f, 0x62, 0x71, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x42, 0x69, 0x67, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x52, 0x08, 0x62, 0x69, 0x67, 0x71, 0x75, 0x65, 0x72, 0x79, 0x42, 0x2f, 0x5a, 0x2d, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x68, 0x72, 0x65, 0x64, 0x73, 0x2f, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x62, 0x71, 0x2d, 0x73, 0x63, + 0x68, 0x65, 0x6d, 0x61, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, } var (