AML Overview
Introduction
AML (Analytical Modeling Language) is a declarative language used to define data semantic models and other analytical objects in Holistics, like datasets and dashboards. It allows users to add more meaning to data without modifying the underlying structure, and make use of Holistics's powerful Analytical Query Language (AQL) to perform complex reports.
Why AML
We strongly believe in the vision of analytics as-code as the future of BI and analytics. However, in our opinion, there is not an adequate existing analytics-as-code language.
While imperative languages like Python and R are powerful for complex logic, they are often overkill for defining semantic models. We advocate for a declarative language that is more suitable for defining semantic models and analytical objects. Unfortunately, existing declarative languages such as XML, JSON, and YAML have their limitations, including excessive verbosity, ambiguity, and a lack of type checking. Although LookML is a strong candidate, it is proprietary and only compatible with Looker.
AML treats your analytics logic as code, not configuration. Three properties make this concrete:
- First-class, typed objects — models, dimensions, measures, metrics, and datasets are real objects with defined types, not SQL strings embedded in YAML. You can reference, pass around, and compose them.
- Static type checking — a built-in type system validates your model as you write it. Errors surface in the IDE at authoring time, not at query time in a broken dashboard.
- Reusable constructs — Constant, Func, Module, Extend, and Partial let you factor out and compose logic instead of copy-pasting it.
Together these make a model maintainable: less code, no drift, and changes that propagate from a single definition. This is what we mean by a language that is both programmable and maintainable — designed from the ground up for reusability, extensive parameterization, and modularization, so data teams can scale their analytical logic effortlessly as needs evolve.
Static types as a feedback loop for AI
Because AML is statically typed, the compiler checks every edit against the model immediately, whether a person writes it or an AI agent generates it. When an agent produces an invalid reference or a type mismatch, the compiler flags it at once, rather than letting the error surface later as a wrong number on a dashboard. This tight author-to-check loop is what makes agentic development on the semantic layer safe to trust.
Design principles
- Declarative: AML is designed for data analysts to declaratively specify the data semantic models and logic, not how to build those imperatively.
- Friendly yet rigorous syntax: AML syntax is crafted with data analysts in mind, drawing inspiration from familiar languages like JSON, YAML, and JavaScript. It strikes a balance between being strict and well-defined, which promotes clarity and minimizes ambiguity in data and configuration expressions.
- Static type checking: AML features a robust built-in static type system that provides instant feedback, enhancing the developer experience with top-notch smart auto-completion and template suggestions directly within the IDE. Both humans and AI agents catch mistakes at authoring time.
- Composability and Reusability: Every component of the language is designed for reuse and composition, utilizing features such as Constant, Function, Module, Extend — so analytics logic scales across a team without duplication or drift.
Using AML in Holistics
AML are written in .<object-type>.aml files in the Development workspace. Currently the following objects are defined using AML:
- Model:
model_name.model.aml - Dataset:
dataset_name.dataset.aml - Relationships:
relationships.aml - Dashboard:
dashboard_name.page.aml
When users create a new object in the Modeling layer, base AML codes are automatically generated for the object. Users can extend on these bases either via the GUI, or manually write AML definitions (like dimension and measure definition, or model relationships...) which will also be reflected visually.
Use cases highlights
Some common reporting use cases that can be solved easily with AML and AQL includes:
Please visit our Guides for more examples of how to leverage AML and AQL to answer your business questions.
Quick start
To quickly get used to AML, we suggest checking out the following pages:
More documents can be found in the sidebar.