Reputation: 667
On the bigquery UI, we can see total size of the data processed. How we can get that information as part of a call and later in the week or month as asynchronous call? Synchronous calls may not show us to total data being process as the channel can get broken and bq might continue to process and charge the usage thus we need to make an asynchronous call to fill up the gaps. Using GetQueryResultsResponse class to stream the data our in a loop
Upvotes: 3
Views: 234
Reputation: 3251
You can retrieve it by either the jobs.get or jobs.list method. Once the job has completed, either API call should expose the amount of bytes processed by a query job in the field statistics.query.totalBytesProcessed.
Upvotes: 3
Reputation: 3988
You can always use the "jobs" list API call and check the totalBytesProcessed field. As long as you are using the same user, you should be allright
Upvotes: 2