Skip to main content

Export data from BigQuery to Google Sheets

You can use Awesome Table Connectors to export from BigQuery to Google Sheets. Exporting to Google Sheets via Awesome Table Connectors allows you to access raw data, schedule refresh to get regular updates, and configure your output sheet's layout, among other features.

This article demonstrates how to use Awesome Table Connectors to get a large dataset from BigQuery and import it into Google Sheets. You can use your own dataset and follow along.

Prerequisites
  1. Open the Select data drop-down and select the method you want to use to import data. We are using Run SQL query.

    Run SQL query is the selected option.
  2. Open the Project drop-down and select the project that you want to use.

    note

    If you are using a public dataset, you can use any project in your account, even if it does not contain the dataset.

  3. Enter a query. We are using Google Trends' top international search terms for the latest available data:

    SELECT
    country_name,
    term,
    ARRAY_AGG(STRUCT(rank,week) ORDER BY week DESC, refresh_date DESC LIMIT 1) x
    FROM
    `bigquery-public-data.google_trends.international_top_terms`
    WHERE
    refresh_date =
    (SELECT
    MAX(refresh_date)
    FROM
    `bigquery-public-data.google_trends.international_top_terms`)
    AND
    week =
    (SELECT
    MAX(week)
    FROM
    `bigquery-public-data.google_trends.international_top_terms`
    )
    GROUP BY
    country_name, term
    ORDER BY
    (SELECT country_name FROM UNNEST(x)), (SELECT rank FROM UNNEST(x))
    note

    The public dataset Google Trends - International we use in this example is available only if you have a Google Cloud account. You must have a Google Cloud account to run requests using public datasets.

  4. (Optional) In the Output options, configure how your data will be inserted into your spreadsheet.

  5. (Optional) Use Preview to choose the columns you need, edit their names, and configure a sort order.

    1. Click Preview.
      A new window opens.
    2. Make the changes you want.
    3. Click Apply changes.
  6. Click Run to start your request.
    Awesome Table Connectors informs you if you successfully exported to Google Sheets.


You have successfully imported data from BigQuery. Successful requests are automatically saved and displayed in the Home screen.

What's next
Schedule a refresh to get regular updates.