Quick Start Example¶
dct init creates a charts/guide.yml starter board in your project.
It works without a database: its sample data is inline.
You can open it in your browser immediately with dct serve.
This page walks through a minimal example to explain the key concepts.
Complete Board¶
title: "Hello World Board" source: db queries: sales: sql: | SELECT month, revenue FROM dundersign_serving.monthly_metrics rows: - title: "Monthly Revenue" charts: revenue_chart: title: "Revenue by Month" query: queries.sales type: bar x: month y: revenue cols: - revenue_chart
Step-by-Step Explanation¶
1. Board Definition¶
title: "Hello World Board"
title: Display title (optional but recommended)
2. Query Definition¶
queries: sales: sql: | SELECT month, revenue FROM dundersign_serving.monthly_metrics
sales: Query name (use descriptive names)sql: A plain SQL query, run against thesource:declared on the boarddundersign_serving.monthly_metrics: A pre-aggregated rollup from the Dundersign demo dataset
3. Section and Chart¶
rows: - title: "Monthly Revenue" charts: revenue_chart: title: "Revenue by Month" query: queries.sales type: bar x: month y: revenue cols: - revenue_chart
rows: Top-level layout (vertical stack)title: Section titlecharts: Chart definitionscols: Nested horizontal layout containing the chart referencerevenue_chart: Chart identifierquery: queries.sales: References the query defined above (usequeries.prefix for clarity)type: bar: Bar chart typex: month: X-axis uses themonthcolumny: revenue: Y-axis uses therevenuecolumn
How to Run It¶
- Save this YAML to a file (for example,
hello_world.yml) - Validate it:
- Preview it:
- Open your browser to the URL printed by
dct serveon startup
What You'll See¶
- A bar chart showing revenue by month
- Data fetched via a plain SQL query against your warehouse
- A responsive layout that works on any device
Next Steps¶
- KPI Board - Add multiple KPIs
- Interactive Board - Add variables and filters
- Read the Queries Guide - Learn more about queries
- Read the Charts Guide - Learn more about charts
- CLI Reference - Complete CLI command reference
- Getting Started Guide - Step-by-step tutorial