google-cloud-cpp
google-cloud-cpp copied to clipboard
BigQuery `AppendRows` API could accept a `write_stream`
We cannot currently send routing metadata for streaming writes. Mainly because we must configure the grpc::ClientContext before we know what the first request will be.
In BigQuery, the semantics are to add extra routing information in the initial request, via the write_stream field. (Note that write_stream is also listed as a method signature)
Maybe we should add std::string const& write_stream as a parameter to the client call. Then we could set internal::GrpcSetupOption to [write_stream] (auto& context) { context.AddMetadata("x-goog-request-params", write_stream); } in order to achieve routing. I do not know whether we should try to modify the initial request to set this field.