Google BigQuery é o data warehouse serverless e totalmente gerenciado do Google Cloud, projetado para analytics de dados em larga escala. O BigQuery permite executar queries SQL rápidas em datasets massivos, sendo ideal para business intelligence, exploração de dados e pipelines de machine learning.
Com a integração do Google BigQuery na Zoen, você pode:
- Executar queries SQL: Rodar queries nos seus datasets do BigQuery e recuperar resultados para análise ou processamento downstream
- Listar datasets: Navegar pelos datasets disponíveis em um projeto do Google Cloud
- Listar e inspecionar tabelas: Enumerar tabelas de um dataset e recuperar informações detalhadas do schema
- Inserir linhas: Enviar novas linhas para tabelas do BigQuery para ingestão de dados em tempo real
Na Zoen, a integração do Google BigQuery permite que seus agentes consultem datasets, inspecionem schemas e insiram linhas como parte de fluxos automatizados. Isso é ideal para relatórios automatizados, orquestração de pipelines de dados, ingestão em tempo real e decisões orientadas por analytics.
Connect to Google BigQuery to run SQL queries, list datasets and tables, get table metadata, and insert rows.
Run a SQL query against Google BigQuery and return the results
| Parameter | Type | Required | Description |
|---|
projectId | string | Yes | Google Cloud project ID |
query | string | Yes | SQL query to execute |
useLegacySql | boolean | No | Whether to use legacy SQL syntax (default: false) |
maxResults | number | No | Maximum number of rows to return |
defaultDatasetId | string | No | Default dataset for unqualified table names |
location | string | No | Processing location (e.g., "US", "EU") |
| Parameter | Type | Description |
|---|
columns | array | Array of column names from the query result |
rows | array | Array of row objects keyed by column name |
totalRows | string | Total number of rows in the complete result set |
jobComplete | boolean | Whether the query completed within the timeout |
totalBytesProcessed | string | Total bytes processed by the query |
cacheHit | boolean | Whether the query result was served from cache |
jobReference | object | Job reference (useful when jobComplete is false) |
↳ projectId | string | Project ID containing the job |
↳ jobId | string | Unique job identifier |
↳ location | string | Geographic location of the job |
pageToken | string | Token for fetching additional result pages |
Fetch results for a previously submitted BigQuery job, or the next page of a Run Query result
| Parameter | Type | Required | Description |
|---|
projectId | string | Yes | Google Cloud project ID |
jobId | string | Yes | ID of the BigQuery job to fetch results for |
pageToken | string | No | Token for pagination |
maxResults | number | No | Maximum number of rows to return |
timeoutMs | number | No | How long to wait for the job to complete, in milliseconds |
location | string | No | Processing location of the job (e.g., "US", "EU") |
startIndex | string | No | Zero-based index of the starting row |
| Parameter | Type | Description |
|---|
columns | array | Array of column names from the query result |
rows | array | Array of row objects keyed by column name |
totalRows | string | Total number of rows in the complete result set |
jobComplete | boolean | Whether the job has completed |
totalBytesProcessed | string | Total bytes processed by the query |
cacheHit | boolean | Whether the query result was served from cache |
jobReference | object | Job reference (useful when jobComplete is false) |
↳ projectId | string | Project ID containing the job |
↳ jobId | string | Unique job identifier |
↳ location | string | Geographic location of the job |
pageToken | string | Token for fetching additional result pages |
List all datasets in a Google BigQuery project
| Parameter | Type | Required | Description |
|---|
projectId | string | Yes | Google Cloud project ID |
maxResults | number | No | Maximum number of datasets to return |
pageToken | string | No | Token for pagination |
| Parameter | Type | Description |
|---|
datasets | array | Array of dataset objects |
↳ datasetId | string | Unique dataset identifier |
↳ projectId | string | Project ID containing this dataset |
↳ friendlyName | string | Descriptive name for the dataset |
↳ location | string | Geographic location where the data resides |
nextPageToken | string | Token for fetching next page of results |
Create a new dataset in a Google BigQuery project
| Parameter | Type | Required | Description |
|---|
projectId | string | Yes | Google Cloud project ID |
datasetId | string | Yes | ID for the new BigQuery dataset |
location | string | No | Geographic location for the dataset (e.g., "US", "EU") |
friendlyName | string | No | Human-readable name for the dataset |
description | string | No | Description of the dataset |
| Parameter | Type | Description |
|---|
datasetId | string | Unique dataset identifier |
projectId | string | Project ID containing this dataset |
friendlyName | string | Descriptive name for the dataset |
description | string | Dataset description |
location | string | Geographic location where the data resides |
creationTime | string | Dataset creation time (milliseconds since epoch) |
Delete a dataset from a Google BigQuery project
| Parameter | Type | Required | Description |
|---|
projectId | string | Yes | Google Cloud project ID |
datasetId | string | Yes | BigQuery dataset ID to delete |
deleteContents | boolean | No | Whether to delete tables inside the dataset (default: false) |
| Parameter | Type | Description |
|---|
deleted | boolean | Whether the dataset was deleted |
List all tables in a Google BigQuery dataset
| Parameter | Type | Required | Description |
|---|
projectId | string | Yes | Google Cloud project ID |
datasetId | string | Yes | BigQuery dataset ID |
maxResults | number | No | Maximum number of tables to return |
pageToken | string | No | Token for pagination |
| Parameter | Type | Description |
|---|
tables | array | Array of table objects |
↳ tableId | string | Table identifier |
↳ datasetId | string | Dataset ID containing this table |
↳ projectId | string | Project ID containing this table |
↳ type | string | Table type (TABLE, VIEW, EXTERNAL, etc.) |
↳ friendlyName | string | User-friendly name for the table |
↳ creationTime | string | Time when created, in milliseconds since epoch |
totalItems | number | Total number of tables in the dataset |
nextPageToken | string | Token for fetching next page of results |
Get metadata and schema for a Google BigQuery table
| Parameter | Type | Required | Description |
|---|
projectId | string | Yes | Google Cloud project ID |
datasetId | string | Yes | BigQuery dataset ID |
tableId | string | Yes | BigQuery table ID |
| Parameter | Type | Description |
|---|
tableId | string | Table ID |
datasetId | string | Dataset ID |
projectId | string | Project ID |
type | string | Table type (TABLE, VIEW, SNAPSHOT, MATERIALIZED_VIEW, EXTERNAL) |
description | string | Table description |
numRows | string | Total number of rows |
numBytes | string | Total size in bytes, excluding data in streaming buffer |
schema | array | Array of column definitions |
↳ name | string | Column name |
↳ type | string | Data type (STRING, INTEGER, FLOAT, BOOLEAN, TIMESTAMP, RECORD, etc.) |
↳ mode | string | Column mode (NULLABLE, REQUIRED, or REPEATED) |
↳ description | string | Column description |
creationTime | string | Table creation time (milliseconds since epoch) |
lastModifiedTime | string | Last modification time (milliseconds since epoch) |
location | string | Geographic location where the table resides |
Create a new table in a Google BigQuery dataset
| Parameter | Type | Required | Description |
|---|
projectId | string | Yes | Google Cloud project ID |
datasetId | string | Yes | BigQuery dataset ID |
tableId | string | Yes | ID for the new BigQuery table |
schema | string | Yes | JSON array of column field definitions, e.g. [{"name":"id","type":"STRING","mode":"REQUIRED"}] |
description | string | No | Description of the table |
friendlyName | string | No | Human-readable name for the table |
| Parameter | Type | Description |
|---|
tableId | string | Table ID |
datasetId | string | Dataset ID |
projectId | string | Project ID |
type | string | Table type (usually TABLE) |
description | string | Table description |
schema | array | Array of column definitions |
↳ name | string | Column name |
↳ type | string | Data type |
↳ mode | string | Column mode (NULLABLE, REQUIRED, or REPEATED) |
↳ description | string | Column description |
creationTime | string | Table creation time (milliseconds since epoch) |
location | string | Geographic location where the table resides |
Delete a table from a Google BigQuery dataset
| Parameter | Type | Required | Description |
|---|
projectId | string | Yes | Google Cloud project ID |
datasetId | string | Yes | BigQuery dataset ID |
tableId | string | Yes | BigQuery table ID to delete |
| Parameter | Type | Description |
|---|
deleted | boolean | Whether the table was deleted |
Preview rows from a Google BigQuery table without running a query. Pair with Get Table to know the column order.
| Parameter | Type | Required | Description |
|---|
projectId | string | Yes | Google Cloud project ID |
datasetId | string | Yes | BigQuery dataset ID |
tableId | string | Yes | BigQuery table ID |
maxResults | number | No | Maximum number of rows to return |
pageToken | string | No | Token for pagination |
startIndex | string | No | Zero-based index of the starting row |
selectedFields | string | No | Comma-separated list of column names to return |
| Parameter | Type | Description |
|---|
rows | array | Array of rows, each a raw array of column values in schema order |
totalRows | string | Total number of rows in the table |
pageToken | string | Token for fetching the next page of results |
Insert rows into a Google BigQuery table using streaming insert
| Parameter | Type | Required | Description |
|---|
projectId | string | Yes | Google Cloud project ID |
datasetId | string | Yes | BigQuery dataset ID |
tableId | string | Yes | BigQuery table ID |
rows | string | Yes | JSON array of row objects to insert |
skipInvalidRows | boolean | No | Whether to insert valid rows even if some are invalid |
ignoreUnknownValues | boolean | No | Whether to ignore columns not in the table schema |
| Parameter | Type | Description |
|---|
insertedRows | number | Number of rows successfully inserted |
errors | array | Array of per-row insertion errors (empty if all succeeded) |
↳ index | number | Zero-based index of the row that failed |
↳ errors | array | Error details for this row |
↳ reason | string | Short error code summarizing the error |
↳ location | string | Where the error occurred |
↳ message | string | Human-readable error description |