The BigQuery (Service Account) connector lets your AI agent work with BigQuery (Service Account). You connect it once with a service account, and Scalekit authenticates every call, so your agent never handles credentials. It comes with 26 tools.
- Tools
- 26
- What they doRead · write · destructive
- 24 · 2 · 024 read2 write0 destructive
- Users sign in with
- Service account
What you can do
- Run SQL queries: execute queries directly or as background jobs, and preview their cost with a dry run
- Browse datasets and tables: list projects, datasets, and tables, and read table schemas and rows
- Manage query jobs: list jobs, check their status, fetch results, and cancel running jobs
- Inspect models and routines: list and read machine learning models, stored procedures, and user-defined functions
- Review access controls: read IAM policies and row access policies, and test permissions on tables and routines
Setup
Install the SDK
Terminal window npm install @scalekit-sdk/node dotenvTerminal window pip install scalekit-sdk-python python-dotenvSet your credentials
Add your Scalekit credentials to your
.envfile. Find values in app.scalekit.com > Developers > API Credentials..env SCALEKIT_ENVIRONMENT_URL=<your-environment-url>SCALEKIT_CLIENT_ID=<your-client-id>SCALEKIT_CLIENT_SECRET=<your-client-secret>Create the BigQuery (Service Account) connection
In AgentKit > Connections, create a BigQuery (Service Account) connection. The name you give it is the
connection_nameyour code passes. See Configure connections.Console steps with screenshots
In Scalekit dashboard, go to AgentKit > Connections > Create Connection. Find BigQuery (Service Account) and click Create.
That’s it — no OAuth credentials or redirect URIs needed. BigQuery Service Account uses server-to-server authentication handled entirely through your GCP service account credentials.
Tools
Pass the exact name toexecute_toolbigqueryserviceaccount_dry_run_queryValidate a SQL query and estimate its cost without executing it.Read-onlyDry Run Query
Validate a SQL query and estimate its cost without executing it. Returns statistics.totalBytesProcessed so you can check byte usage before running the real job.
Inputs
querystringrequired- SQL query to validate and estimate
locationstring- Geographic location where the job should run, e.g. US or EU
use_legacy_sqlboolean- Use BigQuery legacy SQL syntax instead of standard SQLdefault
false
bigqueryserviceaccount_get_datasetRetrieve metadata for a specific BigQuery dataset, including location, description, labels, access controls, and creation/modification times.Read-onlyGet Dataset
Retrieve metadata for a specific BigQuery dataset, including location, description, labels, access controls, and creation/modification times.
Inputs
dataset_idstringrequired- The ID of the dataset to retrieve
bigqueryserviceaccount_get_jobRetrieve the status and configuration of a BigQuery job by its job ID.Read-onlyGet Job
Retrieve the status and configuration of a BigQuery job by its job ID. Use this to poll for completion of an async query job submitted via Insert Query Job.
Inputs
job_idstringrequired- The ID of the job to retrieve
locationstring- Geographic location where the job was created, e.g. US or EU
bigqueryserviceaccount_get_modelRetrieve metadata for a specific BigQuery ML model, including model type, feature columns, label columns, and training run details.Read-onlyGet Model
Retrieve metadata for a specific BigQuery ML model, including model type, feature columns, label columns, and training run details.
Inputs
dataset_idstringrequired- The ID of the dataset containing the model
model_idstringrequired- The ID of the model to retrieve
bigqueryserviceaccount_get_query_resultsRetrieve the results of a completed BigQuery query job.Read-onlyGet Query Results
Retrieve the results of a completed BigQuery query job. Supports pagination via page tokens. Use after polling Get Job until status is DONE.
Inputs
job_idstringrequired- The ID of the completed query job
locationstring- Geographic location where the job was created, e.g. US or EU
max_resultsinteger- Maximum number of rows to return per page
page_tokenstring- Page token from a previous response to retrieve the next page of results
timeout_msinteger- Maximum milliseconds to wait if the query has not yet completed
bigqueryserviceaccount_get_routineRetrieve the definition and metadata of a specific BigQuery routine (stored procedure or UDF), including its arguments, return type, and body.Read-onlyGet Routine
Retrieve the definition and metadata of a specific BigQuery routine (stored procedure or UDF), including its arguments, return type, and body.
Inputs
dataset_idstringrequired- The ID of the dataset containing the routine
routine_idstringrequired- The ID of the routine to retrieve
bigqueryserviceaccount_get_routine_iam_policyRetrieve the IAM access control policy currently set on a BigQuery routine (stored procedure or UDF).Read-onlyGet Routine IAM Policy
Retrieve the IAM access control policy currently set on a BigQuery routine (stored procedure or UDF).
Inputs
dataset_idstringrequired- The ID of the dataset containing the routine
routine_idstringrequired- The ID of the routine to fetch the IAM policy for
requested_policy_versioninteger- The policy format version to be returned
bigqueryserviceaccount_get_row_access_policyRetrieve the definition of a single row access policy on a BigQuery table.Read-onlyGet Row Access Policy
Retrieve the definition of a single row access policy on a BigQuery table.
Inputs
dataset_idstringrequired- The ID of the dataset containing the table
row_access_policy_idstringrequired- The ID of the row access policy to retrieve
table_idstringrequired- The ID of the table containing the row access policy
bigqueryserviceaccount_get_row_access_policy_iam_policyRetrieve the IAM policy for a row access policy on a BigQuery table.Read-onlyGet Row Access Policy IAM Policy
Retrieve the IAM policy for a row access policy on a BigQuery table.
Inputs
dataset_idstringrequired- The ID of the dataset containing the table
row_access_policy_idstringrequired- The ID of the row access policy to get the IAM policy for
table_idstringrequired- The ID of the table containing the row access policy
requested_policy_versioninteger- The IAM policy format version to be returned
bigqueryserviceaccount_get_service_accountRetrieve the email address of the BigQuery-managed service account for the project this connection is scoped to.Read-onlyGet Service Account
Retrieve the email address of the BigQuery-managed service account for the project this connection is scoped to. Used, for example, to grant that service account access to a Cloud Storage bucket for load or export jobs.
Inputs
This tool takes no inputs.
bigqueryserviceaccount_get_tableRetrieve metadata and schema for a specific BigQuery table or view, including column names, types, descriptions, and table properties.Read-onlyGet Table
Retrieve metadata and schema for a specific BigQuery table or view, including column names, types, descriptions, and table properties.
Inputs
dataset_idstringrequired- The ID of the dataset containing the table
table_idstringrequired- The ID of the table or view to retrieve
bigqueryserviceaccount_get_table_iam_policyRetrieve the IAM access control policy currently set on a BigQuery table or view.Read-onlyGet Table IAM Policy
Retrieve the IAM access control policy currently set on a BigQuery table or view.
Inputs
dataset_idstringrequired- The ID of the dataset containing the table
table_idstringrequired- The ID of the table to fetch the IAM policy for
requested_policy_versioninteger- The policy format version to be returned
bigqueryserviceaccount_list_datasetsList all BigQuery datasets in the project.Read-onlyList Datasets
List all BigQuery datasets in the project. Supports filtering by label and pagination.
Inputs
allboolean- If true, includes hidden datasets in the results
filterstring- Label filter expression to restrict results, e.g. labels.env:prod
max_resultsinteger- Maximum number of datasets to return per page
page_tokenstring- Page token from a previous response to retrieve the next page
bigqueryserviceaccount_list_jobsList BigQuery jobs in the project.Read-onlyList Jobs
List BigQuery jobs in the project. Supports filtering by state and projection, and pagination.
Inputs
all_usersboolean- If true, returns jobs for all users in the project; otherwise returns only the current user's jobs
max_resultsinteger- Maximum number of jobs to return per page
page_tokenstring- Page token from a previous response to retrieve the next page
projectionstring- Controls the fields returned: minimal (default) or full
state_filterstring- Filter jobs by state: done, pending, or running
bigqueryserviceaccount_list_modelsList all BigQuery ML models in a dataset, including their model type, training status, and creation time.Read-onlyList Models
List all BigQuery ML models in a dataset, including their model type, training status, and creation time.
Inputs
dataset_idstringrequired- The ID of the dataset to list models from
max_resultsinteger- Maximum number of models to return per page
page_tokenstring- Page token from a previous response to retrieve the next page
bigqueryserviceaccount_list_projectsList Google Cloud projects with BigQuery enabled that the connected service account can access.Read-onlyList Projects
List Google Cloud projects with BigQuery enabled that the connected service account can access. Useful for confirming which project the service account key is scoped to.
Inputs
max_resultsinteger- Maximum number of projects to return per page
page_tokenstring- Page token from a previous response to retrieve the next page
bigqueryserviceaccount_list_routinesList all stored procedures and user-defined functions (UDFs) in a BigQuery dataset.Read-onlyList Routines
List all stored procedures and user-defined functions (UDFs) in a BigQuery dataset.
Inputs
dataset_idstringrequired- The ID of the dataset to list routines from
filterstring- Filter expression to restrict results, e.g. routineType:SCALAR_FUNCTION
max_resultsinteger- Maximum number of routines to return per page
page_tokenstring- Page token from a previous response to retrieve the next page
bigqueryserviceaccount_list_row_access_policiesList the row access policies defined on a BigQuery table.Read-onlyList Row Access Policies
List the row access policies defined on a BigQuery table. Supports pagination.
Inputs
dataset_idstringrequired- The ID of the dataset containing the table
table_idstringrequired- The ID of the table to list row access policies for
page_tokenstring- Page token from a previous response to retrieve the next page
bigqueryserviceaccount_list_table_dataRead rows directly from a BigQuery table without writing a SQL query.Read-onlyList Table Data
Read rows directly from a BigQuery table without writing a SQL query. Supports pagination, row offset, and field selection.
Inputs
dataset_idstringrequired- The ID of the dataset containing the table
table_idstringrequired- The ID of the table to read rows from
max_resultsinteger- Maximum number of rows to return per page
page_tokenstring- Page token from a previous response to retrieve the next page
selected_fieldsstring- Comma-separated list of fields to return; if omitted all fields are returned
start_indexinteger- Zero-based row index to start reading from
bigqueryserviceaccount_list_tablesList all tables and views in a BigQuery dataset.Read-onlyList Tables
List all tables and views in a BigQuery dataset. Supports pagination.
Inputs
dataset_idstringrequired- The ID of the dataset to list tables from
max_resultsinteger- Maximum number of tables to return per page
page_tokenstring- Page token from a previous response to retrieve the next page
bigqueryserviceaccount_run_queryExecute a SQL query synchronously against BigQuery and return results immediately.Read-onlyRun Query
Execute a SQL query synchronously against BigQuery and return results immediately. Best for short-running queries. For long-running queries use Insert Query Job instead.
Inputs
querystringrequired- SQL query to execute
create_sessionboolean- If true, creates a new session and returns a session ID in the response
dry_runboolean- If true, validates the query and returns estimated bytes processed without executing
locationstring- Geographic location of the dataset, e.g. US or EU
max_resultsinteger- Maximum number of rows to return in the response
timeout_msinteger- Maximum milliseconds to wait for query completion before returning
use_legacy_sqlboolean- Use BigQuery legacy SQL syntax instead of standard SQLdefault
false
bigqueryserviceaccount_test_routine_iam_permissionsCheck which of a given set of IAM permissions the caller has on a BigQuery routine.Read-onlyTest Routine IAM Permissions
Check which of a given set of IAM permissions the caller has on a BigQuery routine.
Inputs
dataset_idstringrequired- The ID of the dataset containing the routine
permissionsarrayrequired- The set of IAM permissions to check
routine_idstringrequired- The ID of the routine to test permissions against
bigqueryserviceaccount_test_row_access_policy_iam_permissionsCheck which of a given set of IAM permissions the caller has on a row access policy.Read-onlyTest Row Access Policy IAM Permissions
Check which of a given set of IAM permissions the caller has on a row access policy.
Inputs
dataset_idstringrequired- The ID of the dataset containing the table
permissionsarrayrequired- The set of IAM permissions to check
row_access_policy_idstringrequired- The ID of the row access policy to test permissions against
table_idstringrequired- The ID of the table containing the row access policy
bigqueryserviceaccount_test_table_iam_permissionsCheck which of a given set of IAM permissions the caller has on a BigQuery table or view.Read-onlyTest Table IAM Permissions
Check which of a given set of IAM permissions the caller has on a BigQuery table or view. This is a read-only check despite being a POST request — no state is modified.
Inputs
dataset_idstringrequired- The ID of the dataset containing the table
permissionsarrayrequired- The set of IAM permissions to check
table_idstringrequired- The ID of the table to test permissions against
bigqueryserviceaccount_cancel_jobRequest cancellation of a running BigQuery job.WriteCancel Job
Request cancellation of a running BigQuery job. Returns the final job resource. Cancellation is best-effort and the job may complete before it can be cancelled.
- Idempotent
Inputs
job_idstringrequired- The ID of the job to cancel
locationstring- Geographic location where the job was created, e.g. US or EU
bigqueryserviceaccount_insert_query_jobSubmit an asynchronous BigQuery query job.WriteInsert Query Job
Submit an asynchronous BigQuery query job. Returns a job ID that can be used with Get Job or Get Query Results to poll for completion and retrieve results.
Inputs
querystringrequired- SQL query to execute
create_dispositionstring- Specifies whether the destination table is created if it does not exist
destination_dataset_idstring- Dataset ID to write query results into
destination_table_idstring- Table ID to write query results into
locationstring- Geographic location where the job should run, e.g. US or EU
maximum_bytes_billedstring- Maximum bytes that can be billed for this query; query fails if limit is exceeded
prioritystring- Job priority: INTERACTIVE (default) or BATCH
use_legacy_sqlboolean- Use BigQuery legacy SQL syntax instead of standard SQLdefault
false write_dispositionstring- Specifies the action when the destination table already exists
No tools match.
Workflows
Execute a tool
const result = await actions.executeTool({ connector: 'bigqueryserviceaccount', identifier: 'user_123', toolName: 'bigqueryserviceaccount_run_query', toolInput: { query: 'SELECT 1 AS test', },});console.log(result);result = actions.execute_tool( connection_name='bigqueryserviceaccount', identifier='user_123', tool_name='bigqueryserviceaccount_run_query', tool_input={ "query": "SELECT 1 AS test", },)print("Query result:", result.data)Proxy API call
const result = await actions.request({ connectionName: 'bigqueryserviceaccount', identifier: 'user_123', path: '/datasets', method: 'GET',});console.log(result);result = actions.request( connection_name='bigqueryserviceaccount', identifier='user_123', path="/datasets", method="GET",)print(result)