BigQuery Semantic Layer with Bonnard

Connect Bonnard to BigQuery and ship governed metrics to AI agents, dashboards, and your product. YAML semantic layer with MCP and React SDK.

3 min read

Bonnard gives you a BigQuery semantic layer defined in YAML, version-controlled, and queryable from AI agents, React components, and REST APIs. BigQuery handles petabyte-scale analytics with pay-per-query pricing. Bonnard connects directly and exposes governed metrics through MCP, React SDK, REST API, and markdown dashboards.

How does Bonnard connect to BigQuery?

Add BigQuery as a datasource in your Bonnard project. Define the connection in your datasources.yml:

# datasources.yml
datasources:
  - name: bigquery_warehouse
    type: bigquery
    project_id: your-gcp-project
    credentials: ${GOOGLE_APPLICATION_CREDENTIALS}
    dataset: analytics
    location: US

Then run:

bon datasource add bigquery_warehouse
bon deploy

Bonnard authenticates with your GCP service account, introspects your dataset, and deploys your semantic layer. No additional infrastructure. Your BigQuery data is queryable through every Bonnard surface within minutes.

What do you get?

Once connected, your BigQuery data is available through four surfaces:

MCP server. Run bon mcp and your AI agents (Claude, ChatGPT, Cursor) query governed BigQuery metrics with row-level security. Generate publishable keys per tenant for customer-facing agentic analytics.

React SDK. Drop BarChart, LineChart, and BigValue components into your product. Every chart queries your BigQuery dataset through the semantic layer with multi-tenant access controls applied automatically.

REST API. Query metrics programmatically from any language or platform. Type-safe queries with the TypeScript SDK or raw HTTP from anywhere.

Markdown dashboards. Author dashboards in markdown, deploy with bon deploy, and share governed views with your team or customers.

How does Bonnard compare to native BigQuery analytics?

Capability BigQuery native Bonnard + BigQuery
Metric definitions SQL views, saved queries YAML semantic layer (version-controlled)
AI agent access Vertex AI (separate setup) MCP server with publishable keys
Embedded analytics Looker Studio (separate product) React SDK with multi-tenant auth
Dashboards Looker Studio Markdown dashboards, deployed via CLI
Multi-tenancy IAM + dataset permissions Publishable keys + row-level security
Pre-aggregation Materialized views (manual) Automatic pre-aggregation cache
dbt integration Native dbt support bon datasource add --from-dbt imports models
Access control IAM roles YAML-defined RBAC + audit logging
Cost control Slot reservations Pre-aggregation reduces query volume

FAQ

Does Bonnard support BigQuery?

Yes. BigQuery is a first-class Bonnard datasource. Standard and Enterprise editions are supported. Point Bonnard at your GCP project and dataset, provide a service account, and deploy.

How does authentication work with BigQuery?

Bonnard uses Google Cloud service account credentials. Set the GOOGLE_APPLICATION_CREDENTIALS environment variable to your key file path, or pass the credentials inline. Workload Identity Federation is also supported for keyless authentication.

Can I reduce BigQuery costs with Bonnard?

Yes. The pre-aggregation cache stores frequently queried metrics. Instead of running full table scans on every request, repeated queries hit the cache. Define rollups in your cube YAML files and Bonnard builds them automatically.

Can I import dbt models from BigQuery?

Yes. Run bon datasource add --from-dbt pointed at your dbt project. Bonnard imports your models as cubes and your metrics as measures. Layer the semantic layer on top of your existing dbt transformations without duplicating logic.

Connect BigQuery. Ship governed analytics.

Define your metrics in YAML, connect to BigQuery, and expose governed analytics through MCP, React SDK, and REST API.