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 deployPrerequisites
- Logged in — run
bon loginfirst - Valid cubes and views — must pass
bon validate - Working connections — data sources must be accessible
What Happens
- Validates — checks cubes and views for errors
- Tests connections — verifies data source access
- Uploads — sends cubes and views to Bonnard
- 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-orgDeploy 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 deploymentError 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 analyticsAuth Errors
✗ Not logged in.
Run: bon loginWhat Gets Deployed
| Source | Deployed |
|---|---|
bonnard/cubes/*.yaml | All cube definitions |
bonnard/views/*.yaml | All view definitions |
.bon/datasources.yaml | Connection configs (credentials encrypted) |
bon.yaml | Project settings |
Deployment Behavior
- Replaces previous deployment (not additive)
- All or nothing — partial deploys don't happen
- Instant — changes take effect immediately
Best Practices
- Validate first — run
bon validatebefore deploy - Test locally — verify queries work before deploying
- Use version control — commit cubes and views before deploying
- Monitor after deploy — check for query errors
See Also
- workflow
- workflow.validate
- cubes
- views