BigQuery
Comprehensive guide to the BigQuery node in StackAI: actions, inputs, configurations, outputs, and usage examples for seamless Google BigQuery integration.
How to Use the BigQuery Node
The BigQuery Node in StackAI is designed to execute SQL queries on your Google BigQuery database. It can be used to retrieve, analyze, and process large datasets as part of your workflow automation. You can connect this node to other nodes to automate data-driven tasks, reporting, or trigger downstream actions based on query results.
Establishing a Connection to BigQuery
You need to complete two main steps to get your BigQuery Project ID and the Credentials JSON file:
1. Finding Your BigQuery Project ID
The Project ID is a unique identifier for your Google Cloud project. You can find it in the Google Cloud Console:

Go to the Google Cloud Console: Open your web browser and navigate to the Google Cloud Console.
Locate the Project Selector: At the very top of the page, there is a project selection drop-down menu (it usually displays the project name). Click on it.
Find the Project ID: In the window that appears, look for your desired project. The Project ID will be listed below the Project name.
Tip: Once you select the project, the Project ID often appears in the browser's URL and in the Dashboard area.
2. Creating and Downloading the Credentials JSON
You should use a Service Account to generate the JSON key file for programmatic access. This is the most secure way to connect applications to BigQuery.
Create a Service Account:
Go to the IAM & Admin Service Accounts page in the Google Cloud Console.
Select your BigQuery project.
Click + CREATE SERVICE ACCOUNT.
Give it a name and description, then click Create and continue.
Grant a Role: In the "Grant this service account access to project" step, you need to assign roles so it can access BigQuery. For read/write access, the BigQuery Data Editor and BigQuery Job User roles are often sufficient and more secure than granting full admin rights.
Click Continue and then Done.
Generate and Download the JSON Key:

On the Service Accounts page, click the email address of the new service account you just created.
Go to the Keys tab.
Click ADD KEY Create new key.
Select JSON as the Key type and click Create.
A JSON file containing your credentials will be downloaded to your computer. Store this file securely, as it grants access to your BigQuery data. This is the Credentials JSON file you need.
Available Actions
1. Database Query (BigQuery)
Description: Run a SQL query against your Google BigQuery database and retrieve the results for use in your workflow.
Inputs:
query
The SQL query to execute on your BigQuery database.
Yes
SELECT * FROM sales WHERE date > '2025-06-01'
parameters
Optional parameters for parameterized queries.
No
{"region": "US"}
Last updated
Was this helpful?

