AnalyticsCreator Docs Preview

Macros

On this page
  1. Behavior and conditions
  2. Related guidance
  3. Controls
  4. XAML preview
  5. Window layout
  6. Details
  7. Other controls
  8. Scope

Edits a reusable named expression and optional key-table association.

All windows and pages · Common controls and reading this reference

Behavior and conditions

Save requires a nonblank Macro name and Macro statement and a selected Language. It submits metadata first, then regenerates stored view definitions for detected dependent transformations, including indirect macro callers. It does not execute DWH view replacement. Failure during regeneration can therefore leave the new macro definition saved.

Dependency discovery is textual: it searches macro statements for @Name(, then transformation column expressions/defaults, transformation filters and source-table filters/join expressions/subselects. Renaming a macro does not rewrite existing calls: discovery uses the new name, so review old calls separately. This search is not an exhaustive dependency analysis of every repository SQL field.

The repository SQL macro parser substitutes positional :1, :2, etc. in macro text. For example, statement ISNULL(:1, 0) with call @Example(T.Amount) produces ISNULL(T.Amount, 0). This is a text-expansion example, not a database execution result. The inspected parser looks up macros by name without filtering Language; a language selection does not convert an expression into another target dialect.

Controls

Find a control

General

Macro

Macro / Macro statement

Details

The entries include tabs, grid columns, fields and context-menu actions. Repeated captions can belong to different grids or menus. Selection-dependent and initially hidden controls are included; inclusion is not a promise that every control is visible at once. Fixed choices below are declared choices, not a platform support matrix.

XAML preview

WPF renders the compiled XAML view with the application styles and empty fields. The image variant follows the documentation color theme.

Window layout

XAML illustration: Window layout XAML illustration: Window layout

General

Cancel

Navigates back through the shared Save changes? prompt when edits are marked dirty. Yes saves, No leaves without saving pending edits, and Cancel keeps the editor open. A previous Save is not rolled back.

Location: General. Control: Button.

Save

Validates required fields, inserts/updates the macro, then regenerates stored view definitions for detected dependants. Does not deploy the changed views or prove the expression is valid. Review dependencies before applying the changed output.

Location: General. Control: Button.

Macro name

Required repository-unique name, stored with a maximum length of 50 characters. Calls use @Name(...). Save rejects blanks; storage enforces uniqueness/length. Renaming does not migrate existing calls.

Location: General. Control: Text field.

Panel divider

Drag to resize the adjacent panels. This changes presentation, not stored data values.

Location: General. Control: Panel divider.

Macro

Location: General. Control: Group.

Details

Location: General. Control: Expander.

Details

XAML illustration: Details XAML illustration: Details

Details

Language

Repository macro-language classification. Seeded choices are SSIS, T-SQL, MDX and DAX. Choose the dialect required by the consumer; these choices do not certify every generator path. The SQL text parser itself does not filter macros by this value.

Location: Details. Control: Dropdown.

Initial value: T-SQL (LanguageID 2) for a new macro.

Referenced table

Optional table whose key the expression returns. Choices are (none) plus repository tables with at least one primary-key column, sorted by schema/name. Supports automatic references for columns calculated with the macro; it does not change the calculation or check that returned values exist in that table.

Location: Details. Control: Dropdown.

Initial value: (none) for a new macro.

Description

Optional macro documentation, maximum 255 stored characters; whitespace-only input is stored as NULL. Not used in expansion.

Location: Details. Control: Text field.

Other controls

Macro

Macro statement

Location: Macro. Control: Group.

Macro / Macro statement

Macro definition interpreted using the selected macro language

Required reusable expression text. SQL macro expansion uses positional placeholders such as :1 and :2; the definition determines the arguments. Save does not parse or execute the statement as a standalone expression.

Location: Macro / Macro statement. Control: SQL editor.

Scope

Options can depend on the selected object, its saved values and the current repository.

Search documentation