Skip to content
Scalekit Docs
Talk to an Engineer Dashboard

Connect AI agents to BigQuery (Service Account)

Scalekit connector
Open markdown

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

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

  1. Install the SDK

    Terminal window
    npm install @scalekit-sdk/node dotenv
  2. Set your credentials

    Add your Scalekit credentials to your .env file. 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>
  3. Create the BigQuery (Service Account) connection

    In AgentKit > Connections, create a BigQuery (Service Account) connection. The name you give it is the connection_name your 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 to execute_tool
Try in PlaygroundRequest a tool
  • bigqueryserviceaccount_dry_run_queryValidate a SQL query and estimate its cost without executing it.Read-only

    Dry 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-only

    Get 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-only

    Get 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-only

    Get 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-only

    Get 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-only

    Get 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-only

    Get 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-only

    Get 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

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);
Proxy API call
const result = await actions.request({
connectionName: 'bigqueryserviceaccount',
identifier: 'user_123',
path: '/datasets',
method: 'GET',
});
console.log(result);