Getting Started
Set up Bonnard and build your first semantic layer in minutes.
What is Bonnard?
Bonnard is a semantic layer platform that sits between your data warehouse and your consumers (BI tools, AI agents, applications). You define your metrics and dimensions once in YAML, then query them through a consistent API.
Prerequisites
- Node.js 18+ — Install Node.js
- A data warehouse — PostgreSQL, Snowflake, BigQuery, or Databricks
- A Bonnard account — Sign up at app.bonnard.dev
Install the CLI
npm install -g @bonnard/cliVerify the installation:
bon --versionLog in
Authenticate with your Bonnard account:
bon loginThis opens your browser to complete authentication. Once done, verify with:
bon whoamiInitialize a project
Navigate to your project directory and run:
bon initThis creates the project structure:
my-project/
├── bon.yaml # Project configuration
├── bonnard/
│ ├── cubes/ # Cube definitions (measures + dimensions)
│ └── views/ # View definitions (curated interfaces)
└── .bon/ # Local config (gitignored)
└── datasources.yamlIf you have an existing dbt project, bon init will detect it and set up your agent context accordingly.
Connect a data source
Add your warehouse connection:
bon datasource addFollow the interactive prompts to configure your connection. If you use dbt, you can import from your profiles:
bon datasource add --from-dbtTest the connection:
bon datasource testCreate your first cube
Create a file at bonnard/cubes/orders.yaml:
cubes:
- name: orders
sql_table: public.orders
measures:
- name: count
type: count
- name: total_revenue
type: sum
sql: amount
dimensions:
- name: id
type: number
sql: id
primary_key: true
- name: status
type: string
sql: status
- name: created_at
type: time
sql: created_atValidate
Check your cubes and views for errors:
bon validateDeploy
Push your semantic layer to Bonnard:
bon deployQuery
Test your deployed semantic layer:
bon query --measures orders.count --dimensions orders.statusNext steps
- Learn about cubes — measures, dimensions, joins
- Learn about views — curated interfaces for consumers
- Set up MCP — connect AI agents to your semantic layer
- Read the full workflow guide — validate, deploy, query