Reusability
Create new models from existing dimensions and measures
This document describes how to use AML Extend to create a new data model from existing models
You can use AML Extend to define groups of reusable dimensions/measures, and combine them to create a new data model on the fly chaining extensions together.
// highlight-next-line
PartialModel revenue_metrics {
measure gmv { ... }
measure mrr { ... }
measure arr { ... }
}
// highlight-next-line
PartialModel location {
dimension city_name { ... }
dimension country_code { ... }
}
// highlight-next-line
PartialModel date {
dimension created_at { ... }
dimension updated_at { ... }
}
// Chaining multiple extends
// highlight-next-line
Model merchant_full = company
.extend(revenue_metrics)
.extend(location)
.extend(date)
// highlight-next-line
Model merchant_secure = company
.extend(location)
.extend(date)