1
votes

They say there are no stupid questions, but this might be an exception.

I understand that BigQuery, being a columnar database, does a full table scan for any query over a specific column.

I also understand that query results can be cached or a named table can be created with the results of a query.

However I also see tabledata.list() in the documentation, and I'm unsure of how this fits in with query costs. Once a table is created from a query, am I free to access that table without cost through the API?

Let's say, for example, I run a query that is grouped by UserID, and I want to then present the results of that query to individual users based on that ID. As far as I understand there are two obvious ways of getting out the appropriate row for doing so.

  1. I can write another query over the destination table with a WHERE userID=xxx clause
  2. I can use the tabledata.list() endpoint to get all the (potentially paginated) data and get the appropriate row myself in my code

Where situation 1 would incur a query cost, and situation 2 would not? Am I getting this right?

1

1 Answers

2
votes

Tabledata.list API is free as it actually does not use BigQuery Engine at all

so you are right for both 1 and 2