The Google Cloud action pack contains the following action which enables users to query live data in Google BigQuery via SQL and get the results in a tabular format:
In order to use the Search BigQuery with SQL action, the BigQuery API must be enabled in your Billing GCP Project from here. Users who are using the action must have the BigQuery User role.
This action pack needs the GCP Project ID that you want to bill your queries on. BigQuery determines the location to run the job based on the datasets referenced in the request.
Open Glean Admin Console → Platform → Actions.
Click Add and pick Google Cloud Actions.
Enter the GCP Project ID in the Configuration section
In Publish Settings choose the actions that you wanted enable in Agents.
Add a step and navigate to Select Step > All actions > By data source > Google Cloud.
Setup the action:
Select Search BigQuery with SQL
Enter the SQL that you wish to execute.
Example: select * from acmecorp.customers.dim_all_customers
Add a Respond step. Example: Show only the results from the previous step. If >10 rows, present as a table and mention the column names from row 0. Always add citations.
Always supply a valid Project ID; otherwise calls will fail with a 404 error.
If your queries time out, you can reach out to your Glean account team to raise it. We recommend keeping queries under 120 secs to avoid BigQuery cost spikes.