I'm new to protobufs, so I might be missing other issues with your code, but try replacing:
import "google/protobuf/wrapper.proto" with: import "google/protobuf/wrappers.proto" (with the "s"). On Friday, July 1, 2022 at 2:09:08 AM UTC-4 [email protected] wrote: > I'm trying to using the BigQuery Storage V1 Write client to update > bigquery in a C# app. > I'm following the example in the dotnet reference > <https://cloud.google.com/dotnet/docs/reference/Google.Cloud.BigQuery.Storage.V1/latest/Google.Cloud.BigQuery.Storage.V1.BigQueryWriteClient#Google_Cloud_BigQuery_Storage_V1_BigQueryWriteClient_AppendRows_Google_Api_Gax_Grpc_CallSettings_Google_Api_Gax_Grpc_BidirectionalStreamingSettings_> > but > it doesn't contain a complete setup. > I've written a sample proto message that I believe follows the > requirements laid out in the documentation, but I get an error message when > attempting to append a row. > This leads me to believe that I'm not creating my ProtoDescriptor > correctly, and I'm unable to find the correct documentation on how to map a > type to a ProtoDescriptor? > > The documentation > <https://cloud.google.com/bigquery/docs/reference/storage/rpc/google.cloud.bigquery.storage.v1#protoschema> > > for the proto schema states that I should be able to include the known > types. > > My error message is: > Grpc.Core.RpcException : Status(StatusCode="InvalidArgument", > Detail="Invalid proto schema: BqMessage.proto: > RequestSummaryTableMessage.request_id: ".google.protobuf.StringValue" is > not defined > proto spec: > syntax="proto3" > import "google/protobuf/wrapper.proto" > message TableUpdate { > google.protobuf.StringValue request_id = 1; > } > C# code: > var protoRows = new AppendRowsRequest.Types.ProtoData(); > var mappedMessage =<irrelevant mapper to proto model> > // Initialize a request > var row = new ProtoRows > { > SerializedRows = { mappedMessage.ToByteString() }, > }; > > protoRows.Rows = row; > protoRows.WriterSchema = new ProtoSchema > { > ProtoDescriptor = TableUpdateMessage.Descriptor.ToProto(), > }; > AppendRowsRequest request = new () > { > WriteStreamAsWriteStreamName = > WriteStreamName.FromProjectDatasetTableStream("[PROJECT]", "[DATASET]", > "[TABLE_NAME]", "_default"), > Offset = 0L, > ProtoRows = protoRows, > TraceId = string.Empty, > }; > -- You received this message because you are subscribed to the Google Groups "Protocol Buffers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/protobuf/8772336a-61c8-4a98-9b48-c393e029d09bn%40googlegroups.com.
