Bonnard

To analyse your BigQuery data in Claude, ChatGPT or another AI client, connect it to Bonnard on the Data page. Then give people access to it.

BigQuery at a glance
FactBigQuery
CredentialA Google account that Bonnard creates, with no key file
TenancyNone, or Dataset per customer

Requirements

  • The Editor role or higher in your Bonnard workspace.
  • To work from your AI client: Bonnard connected.
  • Permission to grant IAM roles on the Google Cloud project and its datasets.
  • If your organisation uses “domain restricted sharing” (iam.allowedPolicyMemberDomains), a Google Cloud admin first adds Bonnard’s customer ID, C021ydebb.

1. Start the connection

In your AI client

The agent offers a form link only while the workspace has no data source, or only the sample.

  1. Ask:

    Connect my BigQuery project <project_id> to Bonnard.

  2. Open the link that the agent gives.

  3. Keep Workspace account. Your workspace account shows its email.

In the console

  1. In the console at app.bonnard.ai, select Data, then Add data source, then BigQuery.
  2. Enter a Connection name and the Project ID, not the project name.
  3. Keep Workspace account. Your workspace account shows its email.

2. Grant the workspace account

In the console

Console only

Give the account two roles. The console shows these commands with your values.

Bash

# Let it run queries in the project. This grants no access to data
gcloud projects add-iam-policy-binding <project_id> \
  --member="serviceAccount:<workspace_account>" \
  --role="roles/bigquery.jobUser"

# Let it read one dataset. Run this for each dataset that agents query
bq query --use_legacy_sql=false \
  'GRANT `roles/bigquery.dataViewer` ON SCHEMA `<project_id>`.<dataset>
   TO "serviceAccount:<workspace_account>"'

Grant each dataset, not the project, so Bonnard finds only those. A new grant can take a few minutes.

3. Test and connect

In the console

Console only

Select Test and connect. What Bonnard can read shows the datasets and tables.

A failed test keeps a draft without any key. Select Continue setup on its card on the Data page. While no data source is connected, the agent also gives a resume link. Exit setup removes it. A deleted data source’s name keeps no draft.

Make sure that it is connected

In your AI client

Ask:

Which tables can you read in <connection name>?

The agent calls explore_schema and shows the tables. An Editor first adds themselves on the Access tab.

In the console

A setup started in the console shows <name> is connected and who can use it. Select Give access to change that.

Set tenancy

In the console

Console only

A new data source starts with None. To change it, select the data source’s Tenancy tab. With Dataset per customer, select an Example dataset on the same tab. See Tenancy.

Use a service account key

In the console

Console only

Use a key only if you cannot grant the workspace account. Create a service account with the two roles in step 2 and a JSON key. In step 1, select Service account key, then Upload key (.json). To change later, select Switch to the workspace account on the Settings tab.

Troubleshooting

<account> can't run queries in <project_id>

The account does not have BigQuery Job User on the project. Grant it (step 2). Then test again.

<account> can't see any tables in <project_id>

Grant BigQuery Data Viewer on each dataset (step 2). Then test again.

Bonnard can't use your workspace account right now

The fault is on Bonnard’s side. Try again in a few minutes. If the error continues, contact support. This message has the same cause and fix:

Google didn’t accept your workspace account

bigquery discovery covers at most 100 datasets and this service account can see more: scope its IAM to the datasets you mean to expose.

The account reads over 100 datasets. Remove any project-wide role. Then grant roles/bigquery.dataViewer on each dataset instead (step 2). Past 2,000 tables, the message names tables. The fix is the same.

Google didn't accept the service account key

The key is deleted, disabled or expired. Create and upload a new key.

A table is missing

Grant roles/bigquery.dataViewer on its dataset. After a few minutes, select Re-scan tables on the data source’s Settings tab.

Change or remove

In the console

Console only

On the data source’s Settings tab:

  • Edit connection changes the connection details.
  • Check access re-runs the workspace account’s three tests and shows which failed.
  • Re-scan tables reads the table list now. Bonnard reads it at approximately 6-hour intervals.
  • Delete data source needs the Admin role. Select Delete, then Delete data source. Its dashboards and charts stop running until you connect one with the same name and engine. Then give access again.

To rename the data source, select its name in the page header.

Charts in your AI client