Debian Codegraph @

bigquery/v2/apiv2/bigquerypb/hive_partitioning.pb.go

raw
1 // Copyright 2025 Google LLC
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14
15 // Code generated by protoc-gen-go. DO NOT EDIT.
16 // versions:
17 // protoc-gen-go v1.35.2
18 // protoc v4.25.7
19 // source: google/cloud/bigquery/v2/hive_partitioning.proto
20
21 package bigquerypb
22
23 import (
24 _ "google.golang.org/genproto/googleapis/api/annotations"
25 protoreflect "google.golang.org/protobuf/reflect/protoreflect"
26 protoimpl "google.golang.org/protobuf/runtime/protoimpl"
27 wrapperspb "google.golang.org/protobuf/types/known/wrapperspb"
28 reflect "reflect"
29 sync "sync"
30 )
31
32 const (
33 // Verify that this generated code is sufficiently up-to-date.
34 _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
35 // Verify that runtime/protoimpl is sufficiently up-to-date.
36 _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
37 )
38
39 // Options for configuring hive partitioning detect.
40 type HivePartitioningOptions struct {
41 state protoimpl.MessageState
42 sizeCache protoimpl.SizeCache
43 unknownFields protoimpl.UnknownFields
44
45 // Optional. When set, what mode of hive partitioning to use when reading
46 // data. The following modes are supported:
47 //
48 // * AUTO: automatically infer partition key name(s) and type(s).
49 //
50 // * STRINGS: automatically infer partition key name(s). All types are
51 // strings.
52 //
53 // * CUSTOM: partition key schema is encoded in the source URI prefix.
54 //
55 // Not all storage formats support hive partitioning. Requesting hive
56 // partitioning on an unsupported format will lead to an error.
57 // Currently supported formats are: JSON, CSV, ORC, Avro and Parquet.
58 Mode string `protobuf:"bytes,1,opt,name=mode,proto3" json:"mode,omitempty"`
59 // Optional. When hive partition detection is requested, a common prefix for
60 // all source uris must be required. The prefix must end immediately before
61 // the partition key encoding begins. For example, consider files following
62 // this data layout:
63 //
64 // gs://bucket/path_to_table/dt=2019-06-01/country=USA/id=7/file.avro
65 //
66 // gs://bucket/path_to_table/dt=2019-05-31/country=CA/id=3/file.avro
67 //
68 // When hive partitioning is requested with either AUTO or STRINGS detection,
69 // the common prefix can be either of gs://bucket/path_to_table or
70 // gs://bucket/path_to_table/.
71 //
72 // CUSTOM detection requires encoding the partitioning schema immediately
73 // after the common prefix. For CUSTOM, any of
74 //
75 // * gs://bucket/path_to_table/{dt:DATE}/{country:STRING}/{id:INTEGER}
76 //
77 // * gs://bucket/path_to_table/{dt:STRING}/{country:STRING}/{id:INTEGER}
78 //
79 // * gs://bucket/path_to_table/{dt:DATE}/{country:STRING}/{id:STRING}
80 //
81 // would all be valid source URI prefixes.
82 SourceUriPrefix string `protobuf:"bytes,2,opt,name=source_uri_prefix,json=sourceUriPrefix,proto3" json:"source_uri_prefix,omitempty"`
83 // Optional. If set to true, queries over this table require a partition
84 // filter that can be used for partition elimination to be specified.
85 //
86 // Note that this field should only be true when creating a permanent
87 // external table or querying a temporary external table.
88 //
89 // Hive-partitioned loads with require_partition_filter explicitly set to
90 // true will fail.
91 RequirePartitionFilter *wrapperspb.BoolValue `protobuf:"bytes,3,opt,name=require_partition_filter,json=requirePartitionFilter,proto3" json:"require_partition_filter,omitempty"`
92 // Output only. For permanent external tables, this field is populated with
93 // the hive partition keys in the order they were inferred. The types of the
94 // partition keys can be deduced by checking the table schema (which will
95 // include the partition keys). Not every API will populate this field in the
96 // output. For example, Tables.Get will populate it, but Tables.List will not
97 // contain this field.
98 Fields []string `protobuf:"bytes,4,rep,name=fields,proto3" json:"fields,omitempty"`
99 }
100
101 func (x *HivePartitioningOptions) Reset() {
102 *x = HivePartitioningOptions{}
103 mi := &file_google_cloud_bigquery_v2_hive_partitioning_proto_msgTypes[0]
104 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
105 ms.StoreMessageInfo(mi)
106 }
107
108 func (x *HivePartitioningOptions) String() string {
109 return protoimpl.X.MessageStringOf(x)
110 }
111
112 func (*HivePartitioningOptions) ProtoMessage() {}
113
114 func (x *HivePartitioningOptions) ProtoReflect() protoreflect.Message {
115 mi := &file_google_cloud_bigquery_v2_hive_partitioning_proto_msgTypes[0]
116 if x != nil {
117 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
118 if ms.LoadMessageInfo() == nil {
119 ms.StoreMessageInfo(mi)
120 }
121 return ms
122 }
123 return mi.MessageOf(x)
124 }
125
126 // Deprecated: Use HivePartitioningOptions.ProtoReflect.Descriptor instead.
127 func (*HivePartitioningOptions) Descriptor() ([]byte, []int) {
128 return file_google_cloud_bigquery_v2_hive_partitioning_proto_rawDescGZIP(), []int{0}
129 }
130
131 func (x *HivePartitioningOptions) GetMode() string {
132 if x != nil {
133 return x.Mode
134 }
135 return ""
136 }
137
138 func (x *HivePartitioningOptions) GetSourceUriPrefix() string {
139 if x != nil {
140 return x.SourceUriPrefix
141 }
142 return ""
143 }
144
145 func (x *HivePartitioningOptions) GetRequirePartitionFilter() *wrapperspb.BoolValue {
146 if x != nil {
147 return x.RequirePartitionFilter
148 }
149 return nil
150 }
151
152 func (x *HivePartitioningOptions) GetFields() []string {
153 if x != nil {
154 return x.Fields
155 }
156 return nil
157 }
158
159 var File_google_cloud_bigquery_v2_hive_partitioning_proto protoreflect.FileDescriptor
160
161 var file_google_cloud_bigquery_v2_hive_partitioning_proto_rawDesc = []byte{
162 0x0a, 0x30, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x62,
163 0x69, 0x67, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2f, 0x76, 0x32, 0x2f, 0x68, 0x69, 0x76, 0x65, 0x5f,
164 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f,
165 0x74, 0x6f, 0x12, 0x18, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64,
166 0x2e, 0x62, 0x69, 0x67, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x32, 0x1a, 0x1f, 0x67, 0x6f,
167 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x62,
168 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67,
169 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77,
170 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xdb, 0x01,
171 0x0a, 0x17, 0x48, 0x69, 0x76, 0x65, 0x50, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x69,
172 0x6e, 0x67, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x17, 0x0a, 0x04, 0x6d, 0x6f, 0x64,
173 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x04, 0x6d, 0x6f,
174 0x64, 0x65, 0x12, 0x2f, 0x0a, 0x11, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x75, 0x72, 0x69,
175 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0,
176 0x41, 0x01, 0x52, 0x0f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x55, 0x72, 0x69, 0x50, 0x72, 0x65,
177 0x66, 0x69, 0x78, 0x12, 0x59, 0x0a, 0x18, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x5f, 0x70,
178 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18,
179 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70,
180 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75,
181 0x65, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x16, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x50,
182 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x1b,
183 0x0a, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x42, 0x03,
184 0xe0, 0x41, 0x03, 0x52, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x42, 0x72, 0x0a, 0x1c, 0x63,
185 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e,
186 0x62, 0x69, 0x67, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x32, 0x42, 0x15, 0x48, 0x69, 0x76,
187 0x65, 0x50, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x6f,
188 0x74, 0x6f, 0x5a, 0x3b, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
189 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x2f, 0x62, 0x69, 0x67, 0x71, 0x75, 0x65, 0x72, 0x79,
190 0x2f, 0x76, 0x32, 0x2f, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2f, 0x62, 0x69, 0x67, 0x71, 0x75, 0x65,
191 0x72, 0x79, 0x70, 0x62, 0x3b, 0x62, 0x69, 0x67, 0x71, 0x75, 0x65, 0x72, 0x79, 0x70, 0x62, 0x62,
192 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
193 }
194
195 var (
196 file_google_cloud_bigquery_v2_hive_partitioning_proto_rawDescOnce sync.Once
197 file_google_cloud_bigquery_v2_hive_partitioning_proto_rawDescData = file_google_cloud_bigquery_v2_hive_partitioning_proto_rawDesc
198 )
199
200 func file_google_cloud_bigquery_v2_hive_partitioning_proto_rawDescGZIP() []byte {
201 file_google_cloud_bigquery_v2_hive_partitioning_proto_rawDescOnce.Do(func() {
202 file_google_cloud_bigquery_v2_hive_partitioning_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_cloud_bigquery_v2_hive_partitioning_proto_rawDescData)
203 })
204 return file_google_cloud_bigquery_v2_hive_partitioning_proto_rawDescData
205 }
206
207 var file_google_cloud_bigquery_v2_hive_partitioning_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
208 var file_google_cloud_bigquery_v2_hive_partitioning_proto_goTypes = []any{
209 (*HivePartitioningOptions)(nil), // 0: google.cloud.bigquery.v2.HivePartitioningOptions
210 (*wrapperspb.BoolValue)(nil), // 1: google.protobuf.BoolValue
211 }
212 var file_google_cloud_bigquery_v2_hive_partitioning_proto_depIdxs = []int32{
213 1, // 0: google.cloud.bigquery.v2.HivePartitioningOptions.require_partition_filter:type_name -> google.protobuf.BoolValue
214 1, // [1:1] is the sub-list for method output_type
215 1, // [1:1] is the sub-list for method input_type
216 1, // [1:1] is the sub-list for extension type_name
217 1, // [1:1] is the sub-list for extension extendee
218 0, // [0:1] is the sub-list for field type_name
219 }
220
221 func init() { file_google_cloud_bigquery_v2_hive_partitioning_proto_init() }
222 func file_google_cloud_bigquery_v2_hive_partitioning_proto_init() {
223 if File_google_cloud_bigquery_v2_hive_partitioning_proto != nil {
224 return
225 }
226 type x struct{}
227 out := protoimpl.TypeBuilder{
228 File: protoimpl.DescBuilder{
229 GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
230 RawDescriptor: file_google_cloud_bigquery_v2_hive_partitioning_proto_rawDesc,
231 NumEnums: 0,
232 NumMessages: 1,
233 NumExtensions: 0,
234 NumServices: 0,
235 },
236 GoTypes: file_google_cloud_bigquery_v2_hive_partitioning_proto_goTypes,
237 DependencyIndexes: file_google_cloud_bigquery_v2_hive_partitioning_proto_depIdxs,
238 MessageInfos: file_google_cloud_bigquery_v2_hive_partitioning_proto_msgTypes,
239 }.Build()
240 File_google_cloud_bigquery_v2_hive_partitioning_proto = out.File
241 file_google_cloud_bigquery_v2_hive_partitioning_proto_rawDesc = nil
242 file_google_cloud_bigquery_v2_hive_partitioning_proto_goTypes = nil
243 file_google_cloud_bigquery_v2_hive_partitioning_proto_depIdxs = nil
244 }