How To Fix: BigQuery Data Set Too Big To Download

February 1, 2017

There are many different quirks to BigQuery that can be frustrating if you don’t know the solution. Check out this post and this other post by some awesome coworkers to know more about getting started with BigQuery. For an example of one of those quirks, click here.

Downloading Big Big Query Data Sets

One problem that comes up often, is not being able to download a returned data set from the BigQuery Web UI because it is too large. This blog post will talk about how to solve that issue. It’s not too complicated, it’s just a matter of knowing how to do it!

Create A Place To Store It

First, make a Google Cloud Storage bucket

Go here and click “Create Bucket.”

Create Bucket

Create the bucket. This name is global across all users of Google Cloud Storage so make sure it is unique and don’t forget this name!

UniqueName2

UniqueName2

Now go back over to BigQuery.

Export the Table

When the output of the query is saved as a table, it is then possible to use the little arrow to see a second menu. To make this arrow visible, mouse over the table and then click ‘Export table.’

big-query-export-table

Where Should We Save It?

Next, enter bucket name they created earlier/file name to export to/.csv. Following the examples above, the cloud storage URI would look like this:

Bucket

Watch It Work

Now it should show that the table is being “extracted” and 1 job is running.

big-query-extract

Look For It

Once it’s finished, go back to the Google Cloud Storage from earlier and the export is shown in the GCS browser.

bucketsaved

Download It!

Now it is possible to click on the file and download it. And Volià! Easy as that!

It should be noted that this file will cost money to store. Google Cloud Storage is not included in the $500 credit that comes with Google Analytics 360. However, it’s $0.026 per GB per month so that’s not too bad! Check out the pricing.