Skip to content

BigQuery samples #10224

Answered by coryan
gasgallo asked this question in Q&A
Nov 10, 2022 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

google::cloud::bigquery::storage::v1::AppendRowsRequest_ProtoData data; // how to assign my data and schema to AppendRowsRequest_ProtoData?
request.set_allocated_proto_rows(&data);

Probably the easiest thing is to have a protocol buffer with an equivalent schema, such as in this example (it is work in progress, it lacks testing, a good README, etc.):

GoogleCloudPlatform/cpp-samples#211

If you need to do this dynamically, then it will probably get complicated really fast. The API requires uploading the data as serialized protos:

https://github.com/googleapis/googleapis/blob/13d5b3f3f9412f38427c8ad48068f04ad1ee9808/google/cloud/bigquery/storage/v1/storage.proto#L420-L424

So without an act…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@gasgallo
Comment options

Answer selected by gasgallo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants