Skip to main contentThe Google Cloud action pack contains the following actions which enables users to query live data in Google BigQuery via SQL and get the results in a tabular format:
- Search BigQuery with SQL: BigQuery read‑only, user OAuth, SQL text input.
- Gemini BigQuery Analytics with Context: Natural‑language analytics,user OAuth (cloud‑platform scope), centralized OAuth app with background execution supported by default.
Key Features
- Real-time warehouse access – no extra indexing required.
- User-level OAuth ensures results match the caller’s BigQuery permissions.
- Read-only guarantees: write/DDL statements are blocked by the bigquery.readonly scope.
- Glean Agents can combine the results from this action with unstructured docs to generate unified answers for users.
Configuration
Prerequisites
Setup Google Cloud action pack
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 the Glean Admin Console → Platform → Actions.
- Click Add and select Google Cloud Actions.
- Enter the GCP Project ID in the Configuration section.
- In Publish Settings, choose the actions that you want to enable in Agents.
- Click Save.
Usage Instructions
Set Up in Agent Builder
Search BigQuery with SQL action
-
Add a step and navigate to Select Step → All actions → By data source → Google Cloud.
-
Select the action as per your requirement.
-
Setup the action:
- For the action Search BigQuery with SQL, enter the SQL that you want to execute.
Example: select * from acmecorp.customers.dim_all_customers
- For the action Gemini BigQuery Analytics with Context, enter a natural‑language query that you wish to execute.
Example: “What were the top 5 product categories by revenue last quarter? Return a table with category, revenue, and percent_of_total. Sort by revenue desc.”
-
Add a Respond step.
Examples: 1. select * from acmecorp.customers.dim_all_customers
- “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.”
Grant OAuth access
Because Glean ships with a central, scope-restricted Google OAuth client, customers do not have to create their own. Users simply:
- Run an agent that calls a Google Cloud action.
- Follow the Google consent screen and grant permission:
Best Practices and Troubleshooting
- 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.
- If a natural‑language question is ambiguous, include short hints like datasets, measures or filters to improve quality and reduce retries.
Known Limitations
- Only SELECT statements are supported. Write statements (INSERT/UPDATE/DDL) will return “read-only scope” errors.
- SQL results longer than 10 rows are truncated in the current UI. We advise adding a LIMIT or filter.
- Multi-turn conversations are not preserved; each action run is stateless.
- No automatic retries on BigQuery quota or transient errors – rerun the agent if that occurs.
- For more information on limitations for Gemini BigQuery Analytics with Context action, see Data processing limitations.