Dashboard Overview
DAC projects are organized around a project root. Dashboard files live in dashboards/, semantic models live in semantic/, and optional shared themes live in themes/.
Recommended Project Layout
my-project/
├── .bruin.yml
├── dashboards/
│ ├── sales.yml
│ └── operations.dashboard.tsx
├── semantic/
│ └── sales.yml
└── themes/
└── custom.ymlTwo Formats
DAC supports two dashboard formats:
YAML
Best for declarative dashboards with static structure.
name: Sales Overview
connection: my_db
rows:
- widgets:
- name: Revenue
type: metric
sql: SELECT SUM(amount) AS value FROM sales
column: value
prefix: "$"
col: 4See YAML Format.
TSX
Best for dashboards that need loops, variables, or load-time queries.
const tables = query("my_db", "SELECT table_name FROM information_schema.tables WHERE table_schema = 'main'")
export default (
<Dashboard name="Auto Explorer" connection="my_db">
<Tabs>
{tables.rows.map(([table]) => (
<Tab name={table}>
<Row>
<Metric
name="Row Count"
col={4}
sql={`SELECT COUNT(*) AS value FROM "${table}"`}
column="value"
/>
</Row>
</Tab>
))}
</Tabs>
</Dashboard>
)See TSX Format.
Core Concepts
| Concept | Description |
|---|---|
| Widgets | Metrics, charts, tables, text, images, and dividers |
| Rows | Horizontal containers using a 12-column grid |
| Filters | Interactive controls injected into SQL and semantic queries |
| Queries | Named SQL or semantic queries reusable across widgets |
| Semantic Layer | External semantic models loaded from semantic/ |
| Themes | Visual customization via design tokens |
| Schemas | Versioned YAML contracts for dashboards, semantic models, and themes |
File Discovery
When --dir points at a project root, DAC:
- loads dashboards from
dashboards/ - loads semantic models from
semantic/ - loads themes from
themes/when present
Semantic models are optional. Regular SQL dashboards do not need a semantic/ directory and continue to validate independently of semantic dashboards.
Dashboard discovery rules:
*.ymland*.yamlare parsed as YAML dashboards*.dashboard.tsxfiles are parsed as TSX dashboards- files starting with
.are ignored
You can also point --dir directly at the dashboards/ folder. DAC will still resolve sibling semantic/ and themes/ directories from the parent project when they exist.
# serve a project from its root
dac serve --dir .
# or point directly at dashboards
dac serve --dir ./dashboardsDashboard Structure
Each dashboard file contains:
Dashboard
├── name, description, connection
├── model / models (optional semantic defaults)
├── filters (optional)
├── queries (optional)
└── rows
└── widgetsRows can optionally be grouped into tabs for multi-view dashboards.