AML Reusability Overview
Introduction
Analytics logic can become increasingly complex and difficult to maintain as more models, datasets, and dashboards are added. Analysts may end up reinventing the wheel, duplicating efforts and wasting time building similar functionality across different parts of the system.
One of the key design goals of AML (Analytics Modeling Language) is to make the language highly reusable, addressing this common challenge. Unlike pure data serialization formats like XML, JSON, or YAML, AML provides the ability to define reusable components directly within the language.
These reusability mechanisms enable analysts to factor out and abstract repeated logic, making it easy to share and reuse these components across different datasets and dashboards. This helps reduce duplication, improves maintainability, and increases overall efficiency in the analytics development process.
Features
Here are the list of reusability features that AML supports:
- AML Constant: An AML constant allows you to specify a value that can be reused throughout a project.
- AML Function: An AML function is a reusable block of code designed to perform a specific task.
- AML Module: An AML module is a directory containing related AML objects and functions together.
- AML Extend: AML Extend is a function that can be applied on an analytics object to produce a new object that takes on the original properties.
- AML String Interpolation: String interpolation is a feature that allows embedding variable values directly into strings.
Use Cases
- Role-playing dimension
- Expose data with small modifications to different teams
- Combining values from a base model in extending models
- Implementing a metric store
- Defining new models on the fly by combining existing dimensions/measures
- Re-using charts & visualizations
Guide
Please refer to the AML Reusability Guide for detailed steps on how to utilize AML's reusability features.