opensourcegeek
opensourcegeek

Reputation: 5962

How to export data from bigquery based on some filter criteria

I'm wondering how to export data from bigquery table with a lot of data (partitioned), I'd like to download data just for a day but I'm not sure if there is any mechanism available already to do this. The documentation talks about exporting all data but not based on some filter criteria.

Is it possible to run a query with where clause and save the data into another table perhaps and run export?

Upvotes: 0

Views: 1048

Answers (1)

Pentium10
Pentium10

Reputation: 208002

Yes it's exactly as you say.

  1. Run the query, and set a destination table.
  2. Once the query finishes the data will be in your table.
  3. Issue the export job from the new table.
  4. You can delete your own table now.

About exporting data and about storing query results in a table some Java examples are mentioned here.

Upvotes: 2

Related Questions