Skip to content

Unpacking proto.Any #169

@avietrov

Description

@avietrov

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority: p3Desirable enhancement or fix. May not be included in next release.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions