Daana CLI

Build a historized business model from operational source data. Declare it in YAML; Daana CLI generates and runs the SQL.

bookstore: dab/model.yaml (excerpt)
model:
id: BOOK_RETAILER_MODEL
entities:
- id: customer
attributes:
- id: customer_name
type: STRING
effective_timestamp: true
- id: order
attributes:
- id: order_status
type: STRING
effective_timestamp: true
relationships:
- name: is_placed_by
source_entity_id: order
target_entity_id: customer

Introduction

Getting started

Daana builds a historized business model from operational source data. You author the model and the mappings in YAML. Daana validates them, generates the SQL, and deploys and runs it on the target database.

Evaluate Daana

Read a customer's history, query an order at its instant, and add an attribute without a table change.

Build with Daana

Build the bookstore project on a local DuckDB file, from the first model to reporting.

Project and DAB workflow

Lay out a project with daana.yaml, then select, check and deploy its business model.

Reporting with DAR

Declare dimensions and facts on the deployed business model, then create or generate them.

DMDL Reference

Every field of the model, mapping, workflow and connections files.


How a Daana project is organized

A project has three layers. Each layer has files you author and outputs that a tool generates or runs.

LayerWhat it isYou authorGenerated or run
DAS (Data according to System)The source data, as the operational systems store itNothing is required for DAS. Daana CLI has no das command.The source systems, or your loading tool, write the tables Daana reads.
DAB (Data according to Business)The business model that Daana builds and historizes: entities, attributes and relationshipsdab/model.yaml, dab/mappings/*.yaml, dab/workflow.yaml, connections.yamlDaana generates mapping scaffolds, SQL, tables and views. daana install, daana deploy and daana execute run that SQL on the target database.
DAR (Data according to Requirements)Reporting tables and views compiled on the deployed DAB: dimensions and factsdar/*.yamldaana dar apply creates the reporting objects on the target database. For Dataform on BigQuery, daana dar generate writes SQLX files and Dataform runs them.

daana.yaml at the project root selects the workflow and the connection profile that the root commands use. See the Project and DAB workflow guide.


What you author and what Daana CLI generates

The model is yours. It names the entities of your business and the attributes and relationships to keep. This excerpt is from the bookstore model that the tutorial builds:

# dab/model.yaml (excerpt)
model:
  id: BOOK_RETAILER_MODEL
  entities:
    - id: customer
      attributes:
        - id: customer_id
          type: STRING
        - id: customer_name
          type: STRING
          effective_timestamp: true
    - id: order
      attributes:
        - id: order_id
          type: STRING
        - id: order_status
          type: STRING
          effective_timestamp: true
  relationships:
    - name: is_placed_by
      source_entity_id: order
      target_entity_id: customer

A mapping connects one entity to its source tables. daana generate mapping writes a scaffold from the model, with one entry for each attribute and the source table and expressions left to fill in. You decide which source table, key, ingestion strategy and expression each attribute uses:

# dab/mappings/order-line-mapping.yaml (excerpt)
entity_id: order_line
mapping_groups:
  - name: default_mapping_group
    tables:
      - connection: duckdb
        table: stage.sales_order_lines
        primary_keys:
          - "order_id || '-' || order_line_id"
        ingestion_strategy: FULL
        attributes:
          - id: order_line_quantity
            transformation_expression: quantity
          - id: order_line_amount_amount
            transformation_expression: line_total

Daana generates the rest: the SQL that loads each attribute, the history of every mapped attribute, key resolution across sources, and the views you query.

These excerpts are not a runnable project. A runnable project also needs a mapping for each entity, a workflow and a connection profile. The tutorial creates all of them.


Get the Daana CLI binary

Download the 1.0 release candidate from daana.dev/download. The download needs no form and no login. Prerequisites lists the supported platforms and the installation steps.

Book a session with the Daana team at daana.dev/services.


Choose a route

You areStart here
Evaluating Daana for the first timeEvaluate Daana, then Build with Daana.
Reproducing the bookstore example from daana.devThe tutorial. It builds the same bookstore project, with its full model and data.
Upgrading an existing Daana projectThe Project and DAB workflow guide for the daana.yaml layout, then the changelog for changes that need action.

What's in the docs

  • Evaluate Daana: one customer's history from three sources, an order read at its own instant, and an attribute added without a table change, with every result shown.
  • Build with Daana: the bookstore project on DuckDB, from the first model to reporting.
  • Guides: the project and DAB workflow, checking DAB configurations, reporting with DAR, Daana next to an existing stack, reading Daana output, checking a mapping that an agent wrote, and the Daana plugin for Claude Code and Codex.
  • DMDL Reference: the model, mapping, workflow and connections files.
  • Concepts: the Focal Framework and data warehousing fundamentals.
  • Reference: configuration, command reference, glossary, advanced mapping patterns.
  • Changelog: release notes and changes that need action.