Replies: 2 comments
-
Great! I hope we can help.
Can you please clarify what you mean by "consume less data"?
Those protos appear to be an incomplete representation of the interface to query BigQuery. It looks like it only exposes the
We do have a C++ client library for reading bulk data form BigQuery's storage interface (code). This library should be Generally Available (GA) soon. But this library does not offer an SQL querying interface. To query using standard SQL syntax, I think the REST interface is your only option at this point. We do not have a C++ client library for this interface at the moment. |
Beta Was this translation helpful? Give feedback.
-
Thanks for the answer, I'll have a look at the REST interface while I wait for that SQL client 😃
AFAIK, BigQuery is charged for the amount of data processed in the queries. I suppose that reading bulk all the table is more expensive than executing the query and retrieving just some data (these are big tables, in the order of Gigabytes) and probably it is faster than transferring all that information and filtering on the client-side. But all of this is just my guess, probably pricing for storage interface is lower than SQL interface... but still, the data transfer and time can be an issue. |
Beta Was this translation helpful? Give feedback.
-
Hi! I'm starting to use these C++ libraries to connect to different GCP services. I'm really interested in BigQuery.
I'm looking for a C++ example using standard SQL syntax, like the ones here for other languages: https://cloud.google.com/bigquery/docs/samples/bigquery-query. I assume it is the best way to consume less data. I've seen something related to this in
bigquery/v2
protos, but I don't know how to use it with a BigQuery client.Is it possible to do something similar using
google-cloud-cpp
? Is there any other approach I can use?Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions