Saturday, 24 May 2025

How to Save Query Results in BigQuery?

When working with BigQuery, you often need to save query results for further analysis, sharing, or storage. BigQuery provides multiple ways to export query results based on your needs, such as saving to Google Drive, downloading locally, or creating a new BigQuery table.

Saving Query Results in BigQuery

After executing a query in the BigQuery Query Editor, follow these steps to save your results:

 

1. Click on SAVE RESULTS in the query editor.

 

2. Choose from the available options based on your requirement:

 

·      CSV (Google Drive): Save up to 1GB as a CSV file in Google Drive.

·      CSV (local file): Download up to 10MB as a CSV file locally.

·      JSON (local file):  Download up to 10MB as a JSON file locally.

·      JSONL (newline delimited): Save up to 1GB as a newline-delimited JSON file in Google Drive.

·      BigQuery table: Save results directly as a new BigQuery table.

·      Google Sheets: Save up to 10MB of data into a Google Sheet.

·      Copy to Clipboard: Copy up to 1MB of results to paste elsewhere.

 

Note

·      If you need a large dataset saved for future queries, BigQuery table is the best choice.

·      If you want to share data with others, Google Sheets or Google Drive (CSV/JSONL) works well.

·      For quick downloads, use local CSV or JSON files (limited to 10MB).

·      If you just need a small portion of the data, Copy to Clipboard is a fast option.


Previous                                                    Next                                                    Home

No comments:

Post a Comment