I'm looking at BQ API docs: https://cloud.google.com/bigquery/docs/reference/rest/v2/ and would like to confirm what's the difference between
Jobs: query POST https://www.googleapis.com/bigquery/v2/projects/projectId/queries
Jobs: insert (with a 'query' job) POST https://www.googleapis.com/bigquery/v2/projects/projectId/jobs
Both seem to be serving same purpose, querying a table with provided SQL statement...
Did I understand correctly that:
- one return the query results (data) immediately in it's response body, (sort of synchronous / blocking process)
- whereas other just creates a query job in the backend, (sort of async / non-blocking process) and later we still have to execute either Jobs: getQueryResults (if we got jobId) or Tabledata: list in order to fetch query results (data).. both of which I believe work in same way (sync / blocking) as Jobs: query?!
Thanks a lot!
Cheers!
jobs.query
andjobs.insert
are different, then add an answer with an explanation (as you have already written). – Elliott Brossard