Workflows
Blocks
Integrations
BigQuery

BigQuery Action Block

What it does: Runs SQL against Google BigQuery, streams rows into tables, and manages datasets and tables — straight from a workflow.

📊

In simple terms: Ask your warehouse a question in SQL and get back a clean array of row objects you can loop over, feed to an LLM, or push into a report. You can also write events back into BigQuery as they happen.

Credentials

FieldRequiredDescription
Service Account JSONYesThe full contents of a service account JSON key file (client_email + private_key are used to mint an access token)
Default Project IDNoUsed when the block leaves Project ID empty; falls back to project_id inside the JSON key

Create the service account in Google Cloud Console → IAM & Admin → Service Accounts, grant it BigQuery Data Editor and BigQuery Job User on the project, then download a JSON key.

Actions

ActionWhat it doesOutput
Run QueryRuns a Standard SQL query, polling until the job completesrows (array of plain objects), rowCount, totalRows, jobId, schema, raw
Insert RowsStreams a JSON array of row objects into a table (insertAll)insertedRows, raw — reports insertErrors as a failure
List DatasetsLists datasets in the projectDatasets list
List TablesLists tables in a datasetTables list
Get Table SchemaReads a table's column definitionsfields, numRows, location, raw
Create DatasetCreates a dataset in a locationDataset resource
Create TableCreates a table from JSON schema fieldsTable resource
Delete TablePermanently deletes a table{ deleted: true }
Get JobFetches a BigQuery job by idJob resource

Fields

projectId, datasetId, tableId, query, params, maxResults, timeoutMs, location, rows, schemaFields, ignoreUnknownValues, skipInvalidRows, jobId, defaultDataset — all accept {{variables}}.

Tips

  • Query parameters avoid SQL injection. Named form: [{"name":"min","type":"INT64","value":"100"}] used as @min. A plain array like ["abc", 5] becomes positional ? parameters.
  • Timeout (ms) is both the initial query wait and the polling deadline — raise it for heavy scans instead of splitting the query.
  • Set Location whenever the dataset is not in the project's default region (EU, asia-south1, …), otherwise BigQuery returns "not found".
  • Rows from Run Query are already typed (INT64/FLOAT64 → number, BOOL → boolean), so {{bigquery.rows[0].total}} works directly. Very large integers stay strings to avoid precision loss.
  • Insert Rows uses the streaming buffer: rows appear in queries within seconds but cannot be updated or deleted for a short window.
Indite Documentation v1.7.1
PrivacyTermsSupport