Skip to content

Quick Start Example

This is a minimal "hello world" board to get you started with Dataface.


Complete Board

title: "Hello World Board"

queries:
  sales:
    metrics: [total_revenue]
    dimensions: [month]

rows:
  - title: "Monthly Revenue"
    charts:
      revenue_chart:
        title: "Revenue by Month"
        query: queries.sales
        type: bar
        x: month
        y: total_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:
    metrics: [total_revenue]
    dimensions: [month]
  • sales: Query name (use descriptive names)
  • metrics: Array of metric names from your dbt Semantic Layer
  • dimensions: Array of dimension names for grouping

3. Section and Chart

rows:
  - title: "Monthly Revenue"
    charts:
      revenue_chart:
        title: "Revenue by Month"
        query: queries.sales
        type: bar
        x: month
        y: total_revenue
    cols:
      - revenue_chart
  • rows: Top-level layout (vertical stack)
  • title: Section title
  • charts: Chart definitions
  • cols: Nested horizontal layout containing the chart reference
  • revenue_chart: Chart identifier
  • query: queries.sales: References the query defined above (use queries. prefix for clarity)
  • type: bar: Bar chart type
  • x: month: X-axis uses the month dimension
  • y: total_revenue: Y-axis uses the total_revenue metric

How to Run It

  1. Save this YAML to a file (e.g., hello_world.yml)
  2. Validate it:
    face validate hello_world.yml
    
  3. Preview it:
    face serve hello_world.yml
    
  4. Open your browser to http://localhost:8080

What You'll See

  • A bar chart showing revenue by month
  • Data fetched from your dbt Semantic Layer
  • A responsive layout that works on any device

Next Steps