Skip to main content

Design Principles

Declarative and query-based language design

  • Similar to how Ansible and Terraform changed the way infrastructure is defined in code, we strongly believe in the superiority of declarative based language for expressing analytics semantic models
  • But defining semantic models by itself is not enough, we also have the need to have a query language

Intuitive and easy to learn syntax

  • AML's declarative syntax is carefully designed to be familiar with data analysts who work with JSON and YAML data before, while avoiding ambiguity that plagues languages like YAML.
  • AQL's query syntax is designed to be familiar with analysts who has knowledge of SQL, while at the same time fixing the flaws of SQL such as lack of composability and extensibility

Correctness

  • Holistics understands that trust in analytical logic is crucial for accurate decision-making. That's why AMQL includes a powerful type system that provides real-time feedback to analysts to help them avoid errors early.
  • In the future, AMQL will also include a built-in testing system that allows analytics logic to be properly tested before deploying to production.

Developer experience

  • It is 2023 and data analysts should expect their analytics logic code to have excellent developer experience like their programming language counterparts with features such as:
    • Smart syntax highlighting
    • Auto-completion and suggestion
    • Automated refactoring
    • Real time feedback
  • AMQL is designed from the ground up to be able to support these features smoothly and effectively
  • AML Studio and Holistics Lite’s VSCode extension provides dual code-UI mode, which not only softens the learning curve but also makes the experience more intuitive

Reusability

  • Using reusable code makes it significantly easier and quicker to create new analytics logic. Additionally, defining analytics logic in reusable code simplifies maintenance and updates, ensuring that reports and dashboards more likely to remain up-to-date.
  • Unlike pure data serialization formats such as XML, JSON or YAML, AMQL provides ability to define constants, functions, modules right inside the language. These mechanisms enable analysts to factor and abstract out repeated logic and reuse them across datasets and dashboards.
  • Unlike SQL, AQL allows you to save query fragments for later reuse. These fragments can then be combined to create new variations of existing queries when the need arises.
  • Holistics will soon provide a packaging system and a central repository that allows users to import reusable code published by others. This will enable cross-organization reusability of analytics logic.

Performance

  • Ideally, the language should get out of the way of the analysts when they develop analytics logic, thus the performance of its toolchain is of utmost importance.
  • AMQL internal architecture is designed to be incremental, requiring minimal amount of computation needed to handle small changes that are inherent in typical, day-to-day development process.
  • At the same time, the processing performance of full projects is benchmarked and heavily optimized to minimize deployment time.

Extensibility

  • AMQL's parser, type checker, and interpreter are going to be open sourced, enabling developers to create custom tools on top of them.
  • Unlike LookML which only supports Looker’s object, developer can declare their own types, effectively create their own domain specific objects

Let us know what you think about this document :)