Bonnard Docs

Deploy

Push cubes and views to Bonnard for querying.

Overview

The bon deploy command uploads your cubes and views to Bonnard, making them available for querying via the API. It validates and tests connections before deploying.

Usage

bon deploy

Prerequisites

  1. Logged in — run bon login first
  2. Valid cubes and views — must pass bon validate
  3. Working connections — data sources must be accessible

What Happens

  1. Validates — checks cubes and views for errors
  2. Tests connections — verifies data source access
  3. Uploads — sends cubes and views to Bonnard
  4. Activates — makes cubes and views available for queries

Example Output

bon deploy

✓ Validating...
  ✓ bonnard/cubes/orders.yaml
  ✓ bonnard/cubes/users.yaml
  ✓ bonnard/views/orders_overview.yaml

✓ Testing connections...
  ✓ datasource "default" connected

✓ Deploying to Bonnard...
  Uploading 2 cubes, 1 view...

✓ Deploy complete!

Your semantic layer is now available at:
  https://api.bonnard.dev/v1/your-org

Deploy Flow

bon deploy

    ├── 1. bon validate (must pass)

    ├── 2. Test all datasource connections (must succeed)

    ├── 3. Upload to Bonnard API
    │       - cubes from bonnard/cubes/
    │       - views from bonnard/views/
    │       - datasource configs

    └── 4. Activate deployment

Error Handling

Validation Errors

✗ Validating...

bonnard/cubes/orders.yaml:15:5
  error: Unknown measure type "counts"

Deploy aborted. Fix validation errors first.

Connection Errors

✗ Testing connections...
  ✗ datasource "analytics": Connection refused

Deploy aborted. Fix connection issues:
  - Check credentials in .bon/datasources.yaml
  - Verify network access to database
  - Run: bon datasource test analytics

Auth Errors

✗ Not logged in.

Run: bon login

What Gets Deployed

SourceDeployed
bonnard/cubes/*.yamlAll cube definitions
bonnard/views/*.yamlAll view definitions
.bon/datasources.yamlConnection configs (credentials encrypted)
bon.yamlProject settings

Deployment Behavior

  • Replaces previous deployment (not additive)
  • All or nothing — partial deploys don't happen
  • Instant — changes take effect immediately

Best Practices

  1. Validate first — run bon validate before deploy
  2. Test locally — verify queries work before deploying
  3. Use version control — commit cubes and views before deploying
  4. Monitor after deploy — check for query errors

See Also

  • workflow
  • workflow.validate
  • cubes
  • views