LibraryRules
A Library Rule is a reusable Rule for the whole project. Its Expression uses placeholders: @@this stands for the matched column and @@alias.column for a column of the input the alias names in the Rule Set. Its Match fields select the columns it applies to by data type, length, precision, scale and system type. A Rule that applies a Library Rule takes its Expression from the Library Rule each time its view is generated, unless the Rule is detached.
The Rules that apply a Library Rule have their own page.
Overview
Property | Description |
|---|---|
| Name | The name of the Library Rule. This name must be unique in the scope of the selected Customer and Version. |
| Description | Free-format description of the Library Rule. |
| Expression | The SQL of the Library Rule, written with placeholders: @@this stands for the matched column and @@alias.column for a column of the input the alias names in the Rule Set. BimlFlex fills in the placeholders for each Rule that applies the Library Rule when it generates the view. Macros are not accepted in a Library Rule. Example: UPPER(LTRIM(RTRIM(@@this))) |
| Match Length | The length a column must have for the Library Rule to apply to it. Set to -1 to match columns of MAX length. Leave it empty to match any length. |
| Match Precision | The precision a column must have for the Library Rule to apply to it. Leave it empty to match any precision. |
| Match Scale | The scale a column must have for the Library Rule to apply to it. Leave it empty to match any scale. |
| Dialect Alternates Json | Alternate versions of the Expression for other target system types, stored as JSON and keyed by system type code. A Rule that applies the Library Rule takes these alternates with the Expression. |
| Display Folder | Folder path for organizing Library Rules in the UI tree view. |
References
Property | Description |
|---|---|
| Customer | Reference to the Customer that this Library Rule belongs to. |
| Version | Reference to the Version that this Library Rule belongs to. |
| Rule Kind | How the Library Rule produces its column: Pass Through, Rename, Cast, Derived, Aggregate, Lookup or Constant. |
| Match Data Type | The data type a column must have for the Library Rule to apply to it. Leave it empty to match columns of any data type. |
| Match System Type | The system type of the connection of the view that the Library Rule applies to. Leave it empty to apply the Library Rule on every system type. |