Prerequisites
The following example requires thegoogle-cloud-bigquery and openai libraries.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
GoogleBigQueryTools enables agents to interact with Google BigQuery for large-scale data analysis and SQL queries.
google-cloud-bigquery and openai libraries.
uv pip install -U google-cloud-bigquery openai
export GOOGLE_CLOUD_PROJECT=your-project-id
export GOOGLE_CLOUD_LOCATION=your-location
from agno.agent import Agent
from agno.tools.google.bigquery import GoogleBigQueryTools
agent = Agent(
instructions=[
"You are a data analyst assistant that helps with BigQuery operations",
"Execute SQL queries to analyze large datasets",
"Provide insights and summaries of query results",
"Help with data exploration and table analysis",
],
tools=[GoogleBigQueryTools(dataset="your_dataset_name")],
)
agent.print_response("List all tables in the dataset and describe the sales table", stream=True)
| Parameter | Type | Default | Description |
|---|---|---|---|
dataset | str | - | BigQuery dataset name (required). |
project | Optional[str] | None | Google Cloud project ID. Falls back to GOOGLE_CLOUD_PROJECT. One of the two must be set. |
location | Optional[str] | None | BigQuery location. Falls back to GOOGLE_CLOUD_LOCATION. One of the two must be set. |
credentials | Optional[Any] | None | Google Cloud credentials object. |
list_tables | bool | True | Enable table listing functionality. |
describe_table | bool | True | Enable table description functionality. |
run_sql_query | bool | True | Enable SQL query execution functionality. |
all | bool | False | Enables all functionality when set to True. |
| Function | Description |
|---|---|
list_tables | List all tables in the specified BigQuery dataset. |
describe_table | Get detailed schema information about a specific table. |
run_sql_query | Execute SQL queries on BigQuery datasets. |
Was this page helpful?