AI-generated Key Takeaways
-
The BigQuery service in Apps Script enables management of BigQuery projects, data uploads, and query execution using the Google BigQuery API.
-
This advanced service requires prior enabling before use and leverages the same structure as the public API.
-
Sample code is provided demonstrating how to run a query to retrieve Google Search terms and load CSV data into BigQuery.
-
Users can consult the Google Cloud support guide for troubleshooting and support related to the BigQuery service.
The BigQuery service allows you to use the Google BigQuery API in Apps Script. This API gives users the ability to manage their BigQuery projects, upload new data, and execute queries.
Reference
For detailed information on this service, see the reference documentation for the BigQuery API. Like all advanced services in Apps Script, the BigQuery service uses the same objects, methods, and parameters as the public API. For more information, see How method signatures are determined.
To report issues and find other support, see the Google Cloud support guide.
Sample code
The sample code below uses version 2 of the API.
Run query
This sample queries a list of the daily top Google Search terms.
Load CSV data
This sample creates a new table and loads a CSV file from Google Drive into it.