Skip to content

Commit 46cfc4c

Browse files
Google APIscopybara-github
authored andcommitted
feat: add proto annotation for non-ascii field mapping
PiperOrigin-RevId: 473815595
1 parent 0cac79b commit 46cfc4c

2 files changed

Lines changed: 29 additions & 0 deletions

File tree

google/cloud/bigquery/storage/v1/BUILD.bazel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info")
1010
proto_library(
1111
name = "storage_proto",
1212
srcs = [
13+
"annotations.proto",
1314
"arrow.proto",
1415
"avro.proto",
1516
"protobuf.proto",
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
syntax = "proto3";
2+
3+
package google.cloud.bigquery.storage.v1;
4+
5+
import "google/protobuf/descriptor.proto";
6+
7+
option csharp_namespace = "Google.Cloud.BigQuery.Storage.V1";
8+
option go_package = "google.golang.org/genproto/googleapis/cloud/bigquery/storage/v1;storage";
9+
option java_package = "com.google.cloud.bigquery.storage.v1";
10+
option java_multiple_files = true;
11+
option java_outer_classname = "AnnotationsProto";
12+
option php_namespace = "Google\\Cloud\\BigQuery\\Storage\\V1";
13+
14+
extend google.protobuf.FieldOptions {
15+
// Setting the column_name extension allows users to reference
16+
// bigquery column independently of the field name in the protocol buffer
17+
// message.
18+
//
19+
// The intended use of this annotation is to reference a destination column
20+
// named using characters unavailable for protobuf field names (e.g. unicode
21+
// characters).
22+
//
23+
// More details about BigQuery naming limitations can be found here:
24+
// https://cloud.google.com/bigquery/docs/schemas#column_names
25+
//
26+
// This extension is currently experimental.
27+
optional string column_name = 454943157;
28+
}

0 commit comments

Comments
 (0)