# Daana > Daana is a declarative data platform. You declare your sources, your business and your metrics in YAML, and Daana generates the pipelines between them. Every layer is a declaration, so an agent can learn what the platform does, and what each piece of data means and where it comes from, without reading pipeline code. Daana is in beta. The full reference (schemas, commands, concepts) is at https://docs.daana.dev/llms.txt; this file covers what Daana is and how to read a Daana platform. ## The three layers - DAS, the sources: one data contract per source entity (ODCS v3). It says what each field means in the source's own words, and where it is extracted from. - DAB, the business: `model.yaml` declares the business's entities, attributes and relationships, each with a definition. Mappings say how each attribute is computed from the source contracts, and at which event time it takes effect. - DAR, the reporting: dar-spec documents declare dimensions, facts and metrics on the business model, each with a description. ## How to walk a Daana platform To explain a number, walk back from the metric to the source. At each layer, ask two questions: what does this mean, and where does it come from? 1. DAR: the metric's description and the flags or conditions it counts. 2. DAB: the definitions of the attributes it reads, in `model.yaml`. 3. DAB mappings: how each attribute is computed from the source, including value mappings and the effective-time expression. 4. DAS: the contract's field descriptions and the event time, to tell late data from lost data. 5. The landing data itself, once every declaration checks out. To assess a change, walk forward from a source field to everything that depends on it. To diagnose a mismatch, compare the declarations on both sides. ## Worked example: daily revenue in a bookstore The example on daana.dev, from the bookstore demo: a book retailer modelled in 42 entities and 70 relationships. Here, one amount followed from the shop database to a metric. The model and mapping are an excerpt of the demo's own; the contracts and the dar-spec were written for this example. Each file passes the Daana CLIs' checks. - [DAS contract](https://daana.dev/examples/bookstore/das/contracts/shop__sales_order_lines.yaml): `sales_order_lines`, where `line_total` is computed by the shop database as `(quantity × unit_price) − discount_amount + tax_amount`, and a line has no timestamp of its own - [DAS contract](https://daana.dev/examples/bookstore/das/contracts/shop__sales_orders.yaml): `sales_orders`, with `order_date` (event time) and `ingested_at` (load time), to tell late data from lost data - [DAB model](https://daana.dev/examples/bookstore/model.yaml): 5 of the 42 entities (customer, order, order_line, book, author) and their relationships; `order_line.order_line_amount` is "Amount charged for the line, tax included" - [DAB mapping](https://daana.dev/examples/bookstore/mappings/order-line-mapping.yaml): `line_total` becomes `order_line_amount`, effective at the order's `order_date` - [DAR spec](https://daana.dev/examples/bookstore/dar/order_line.yaml): daily revenue, the order lines' amounts summed by the day the order was placed (compiles to `fct__order_line_daily_revenue`) ## Read more - [The standup that already knew the root cause](https://blog.daana.dev/blog/the-standup-that-already-knew-the-root-cause): an agent walks these layers to the root cause of a dip in a number - [Documentation](https://docs.daana.dev) - [Join the beta](https://daana.dev/#waitlist)