Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unpacking proto.Any #169

Open
avietrov opened this issue Dec 23, 2023 · 0 comments
Open

Unpacking proto.Any #169

avietrov opened this issue Dec 23, 2023 · 0 comments
Labels
priority: p3 Desirable enhancement or fix. May not be included in next release. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Comments

@avietrov
Copy link

Describe the solution you'd like

I'd like properties of type proto.Any to be recursively unpacked when formatting the cell values serialized in protobuf.

For example, I have the a cell value serialized using the following schema:

import "google/protobuf/any.proto";
message Foo {
   string id = 1;
   google.protobuf.Any bar = 2;
}

message Bar {
   string baz = 1;
}

When writing to Bigtable I set the value of bar with Any.pack on an instance of Bar. Then I try to inspect the content of the cell. I have all the proto files included in the format-file .

At the moment I get:

id: "123"
bar:
  type_url: "type.googleapis.com/Bar" value: "..."

I'd like cbt to unpack the value to the type specified under "type_url"

Additional context
For comparison, grpcurl is able to identify and unpack proto.Any as long as the type is one of the files added with -import-path and -proto: source?

@avietrov avietrov added priority: p3 Desirable enhancement or fix. May not be included in next release. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. labels Dec 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: p3 Desirable enhancement or fix. May not be included in next release. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
Development

No branches or pull requests

1 participant