Macro
Overview
A Macro is an AnalyticsCreator design object that stores reusable statement logic.
Other objects can call a macro instead of repeating the same expression, filter, or statement.
Function
Use macros to centralize reusable logic and to keep transformation or table expressions consistent.
A macro has a language, an optional referenced-table context, and a statement body. Macros can also call other macros.
Attributes
Attributes define the configuration, behavior, and relationships of the macro entity.
| Attribute | Applies to | Description |
|---|---|---|
| Name | Macro | Required name used when the macro is referenced. |
| Description | Macro | Documents the purpose of the macro. |
| Language | Macro | Determines how the statement is interpreted. |
| Referenced table | Contextual macro | Optional table context used by the macro. |
| Statement | Macro | Reusable statement body. |
How it is used in AnalyticsCreator
| Use case | Description |
|---|---|
| Reuse expressions | Call the same logic from multiple transformation columns, filters, or table expressions. |
| Centralize changes | Update one macro to affect direct and indirect references. |
| Provide table-aware logic | Bind a macro to a table context when its logic depends on table metadata. |
| Trace usage | Review transformations, tables, and macros that reference a macro. |
Relationships
| Related entity | Relationship |
|---|---|
| Transformation | Transformation columns, filters, table settings, or subselects can reference macros. |
| Table | Calculated table columns can reference macros. |
| Macro | A macro can reference another macro directly or indirectly. |
| Referenced table | A macro can be bound to an optional table context. |
Where to configure
Configure or review this entity from the matching AnalyticsCreator user-interface area.