Skip to main content

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.

Moreover, we envision a language that is both programmable and maintainable. This includes the ability to reuse and compose every part of an analytical object consistently, enabling data teams to scale their analytical logic effortlessly as needs evolve. AML is designed from the ground up to incorporate features for reusability, extensive parameterization, and modularization to meet these requirements.

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.
  • Composability and Reusability: Every component of the language is designed for reuse and composition, utilizing features such as Constant, Function, Module, Extend.

Using AML in Holistics

AML are written in .<object-type>.aml files in the AML Studio. Currently the following objects are defined using 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.


Let us know what you think about this document :)