How can I know the size of BigQuery response

Viewed 977

I have a table which stores BigQuery JobIds.
In this table I only have the jobId and not the results .
I need to find out the size of the results and I was trying to use This (query-plan-explanation)
However, I don't see the result size in the response only the total bytes scanned

"totalBytesBilled": "10485760",
"totalBytesProcessed": "2464625",
"totalPartitionsProcessed": "0",
"totalSlotMs": "127"

Any idea how I can get this information?

1 Answers

how I can get this information? (size of query output)

Step 1 - using jobs.get API (by knowing) jobid you extract configuration.query.destinationTable (projectId, datasetId, tableId)

Step 2 - using tables.get API (by knowing projectId, datasetId, tableId) you extract numBytes which is the size of this table in bytes, excluding any data in the streaming buffer. Also numRowswill give you the number of rows of data in this table(still excluding any data in the streaming buffer) .

Related