Data Modeling
Trusted datasets with clear grain and business logic baked in
Data models are trusted datasets — curated tables where all the business logic, joins, and transformations are already baked in. Business users see them as simple tables and don't need to understand the underlying complexity.
What is a data model?
A data model is a query that materializes into a table in your warehouse. It sits between raw data and the questions your team asks. Instead of every analyst re-deriving the same joins and filters, the logic lives in one place.
Two key properties:
- Clear, consistent grain — every row represents the same thing (one order, one user-day, one transaction). No ambiguity about what a row means.
- Fact / dimension form — models follow the classic pattern:
- Fact tables — events and measurements (orders, page views, transactions)
- Dimension tables — descriptive attributes (customers, products, regions)
Data models in MinusX
With MinusX, you can create data models directly from the UI. When you save a model, it is materialized into your warehouse / database as a real table.
Only data models can be whitelisted in a Knowledge Base for org-wide use. This ensures that all users across the organization query from the same trusted, governed datasets — not from raw tables with inconsistent logic.
Best practices
- Define grain first — before writing a model, decide what one row represents
- Keep models self-contained — a business user should be able to query the model without joining other tables
- Name clearly —
fact_orders,dim_customerscommunicate intent immediately - Document in context — add metric definitions and gotchas in the Knowledge Base so the AI writes correct queries