AptlyStar

Google BigQuery

Query, list, and insert data in Google BigQuery

Instrucciones de uso

Connect to Google BigQuery to run SQL queries, list datasets and tables, get table metadata, and insert rows.

Herramientas

google_bigquery_query

Run a SQL query against Google BigQuery and return the results

Entrada

ParámetroTipoObligatorioDescripción
projectIdstringSíGoogle Cloud project ID
querystringSíSQL query to execute
useLegacySqlbooleanNoWhether to use legacy SQL syntax (default: false)
maxResultsnumberNoMaximum number of rows to return
defaultDatasetIdstringNoDefault dataset for unqualified table names
locationstringNoProcessing location (e.g., "US", "EU")

Salida

ParámetroTipoDescripción
columnsarrayArray of column names from the query result
rowsarrayArray of row objects keyed by column name
totalRowsstringTotal number of rows in the complete result set
jobCompletebooleanWhether the query completed within the timeout
totalBytesProcessedstringTotal bytes processed by the query
cacheHitbooleanWhether the query result was served from cache
jobReferenceobjectJob reference (useful when jobComplete is false)
↳ projectIdstringProject ID containing the job
↳ jobIdstringUnique job identifier
↳ locationstringGeographic location of the job
pageTokenstringToken for fetching additional result pages

google_bigquery_list_datasets

List all datasets in a Google BigQuery project

Entrada

ParámetroTipoObligatorioDescripción
projectIdstringSíGoogle Cloud project ID
maxResultsnumberNoMaximum number of datasets to return
pageTokenstringNoToken for pagination

Salida

ParámetroTipoDescripción
datasetsarrayArray of dataset objects
↳ datasetIdstringUnique dataset identifier
↳ projectIdstringProject ID containing this dataset
↳ friendlyNamestringDescriptive name for the dataset
↳ locationstringGeographic location where the data resides
nextPageTokenstringToken for fetching next page of results

google_bigquery_list_tables

List all tables in a Google BigQuery dataset

Entrada

ParámetroTipoObligatorioDescripción
projectIdstringSíGoogle Cloud project ID
datasetIdstringSíBigQuery dataset ID
maxResultsnumberNoMaximum number of tables to return
pageTokenstringNoToken for pagination

Salida

ParámetroTipoDescripción
tablesarrayArray of table objects
↳ tableIdstringTable identifier
↳ datasetIdstringDataset ID containing this table
↳ projectIdstringProject ID containing this table
↳ typestringTable type (TABLE, VIEW, EXTERNAL, etc.)
↳ friendlyNamestringUser-friendly name for the table
↳ creationTimestringTime when created, in milliseconds since epoch
totalItemsnumberTotal number of tables in the dataset
nextPageTokenstringToken for fetching next page of results

google_bigquery_get_table

Get metadata and schema for a Google BigQuery table

Entrada

ParámetroTipoObligatorioDescripción
projectIdstringSíGoogle Cloud project ID
datasetIdstringSíBigQuery dataset ID
tableIdstringSíBigQuery table ID

Salida

ParámetroTipoDescripción
tableIdstringTable ID
datasetIdstringDataset ID
projectIdstringProject ID
typestringTable type (TABLE, VIEW, SNAPSHOT, MATERIALIZED_VIEW, EXTERNAL)
descriptionstringTable description
numRowsstringTotal number of rows
numBytesstringTotal size in bytes, excluding data in streaming buffer
schemaarrayArray of column definitions
↳ namestringColumn name
↳ typestringData type (STRING, INTEGER, FLOAT, BOOLEAN, TIMESTAMP, RECORD, etc.)
↳ modestringColumn mode (NULLABLE, REQUIRED, or REPEATED)
↳ descriptionstringColumn description
creationTimestringTable creation time (milliseconds since epoch)
lastModifiedTimestringLast modification time (milliseconds since epoch)
locationstringGeographic location where the table resides

google_bigquery_insert_rows

Insert rows into a Google BigQuery table using streaming insert

Entrada

ParámetroTipoObligatorioDescripción
projectIdstringSíGoogle Cloud project ID
datasetIdstringSíBigQuery dataset ID
tableIdstringSíBigQuery table ID
rowsstringSíJSON array of row objects to insert
skipInvalidRowsbooleanNoWhether to insert valid rows even if some are invalid
ignoreUnknownValuesbooleanNoWhether to ignore columns not in the table schema

Salida

ParámetroTipoDescripción
insertedRowsnumberNumber of rows successfully inserted
errorsarrayArray of per-row insertion errors (empty if all succeeded)
↳ indexnumberZero-based index of the row that failed
↳ errorsarrayError details for this row
↳ reasonstringShort error code summarizing the error
↳ locationstringWhere the error occurred
↳ messagestringHuman-readable error description

On this page