Overview
The Rule Designer component within the MODELER empowers you to create powerful relational Rules meant for your different business planning scenarios.
Data Rules are managed within the All Data Rules node. Using the buttons in the ribbon, you can create, remove, import, and export data Rules. You can use Move Up and Move Down
to reorder the existing Rules.
Note: The order of the Rules does matter. We’ll explain this in the Link section afterwards.
In the Rule list, you can rename the Rules, assign a Rule to a group, and restore a Rule to a previous saved version.
There are two types of data Rules:
- VIEW: To insert net new records into a Model
- ACTION: To insert or delete records into Models
You will need to decide the Rule type at the time of creation. You’ll not be able to modify the Rule type once it is created.
Navigate to a Rule and click the EDIT icon to start to work on it.
Settings
You can manage parameters and variables in the Settings tab.
Note: Parameters are only valid in Action type Rules.
You can add, delete, reorder, and modify parameters (if applicable) and variables in the Settings tab. The list contains the name and default value of each parameter/variable.
Parameter (Action Rule Only)
Parameters declared here will be used as input parameters for all published stored procedures in the Rule. Click to add a Parameter.
You will need to specify the name of the parameter, and choose its data type from the following:
- Member: One or more hierarchy member(s). The SQL data type is decided by the dimension size and whether the parameter allows multi-select or not
Dimension Size |
Small |
Medium |
Large |
---|---|---|---|
Single-select |
TINYINT |
SMALLINT |
INT |
Multi-select |
tID32Set |
tID32Set |
tID32Set |
- String: Its SQL data type is NVARCHAR(MAX)
- FLOAT: Its SQL data type is FLOAT
- INT: Its SQL data type is INT
You’ll need to specify a default value for each parameter. These default values will only be used for design and display purpose.
Please note, although SQL requires a parameter name to start with an at (@) sign, you do not need to do so in Kepion because the @ will be automatically added. Use @Name when you refer to the parameter in the Rule.
Variable
Use variables to hold data value of a specific type. Click to add a Variable.
Specify the variable name and choose its data type from the following
- Member
- String
- FLOAT
- INT
- SQL
You’ll need to assign a value or specify the definition to all the variables. Unlike parameters, these values will persist in design mode and production mode. Use ${Name} when you refer to the variable in the Rule. All the application variables can be referred using the same syntax ${ApplicationVariableName}.
Component
The component tab displays all the components you have added to your list. Click the component type on the ribbon to add it. There are four groups of components for Action Rules and three for View Rules: Data Source, Transfer, Action (Action Rule only), and Publish.
You can drag any components to re-order within the group. Double-click or click to rename a component. We suggest naming components in the proper way for better organization and knowledge sharing.
Right-clicking on the component gives you four options:
- Remove: Remove the component
- Disable: Disable the component (only available on Action components)
- Find All Reference: Find all components that depend on current component
- Find All Dependencies: Find all components on which current component depends
Let’s take a close look at each component.
Fact
Select from the available fact tables (i.e., Model Partitions) in the current application as the source.
All the available columns in the source will show up in the Define columns area. You can rename, remove, or reorder the columns. Once a column is removed, it will show up in the “Select from available columns” area, where you can double-click the column to add it back into the result set.
All dimension columns are grey, and measure columns are blue. There is a settings icon beside each measure column. Click the setting icon
to open the Column setting window.
You can modify the aggregation function that applies to the Rule. Click OK to save.
You can add your design notes and comments to the bottom Notes area. This note is only for your own reference and will not show up anywhere else.
SCOPE
The SCOPE tab is used to extract only those records that fulfill specified criteria on specific columns. Click the cell to open the edit area.
You can specify the criteria in five ways:
- Members: Only include selected members in associated hierarchy
- Exclude Members: Exclude selected members from associated hierarchy
- SQL: Free-form SQL query; Use the EXAMPLE tab for reference
- Parameter: Only when the column value equal to a parameter value
- Variable: Only when the column value equal to a variable value
All five types are available for dimension columns, whereas only the latter three are applicable to measure columns.
PREVIEW
The PREVIEW tab displays the results that have been generated from your design. The dimension columns of the result are white, whereas the measure columns are highlighted in blue.
The dimension columns are displayed by Member Label by default. You can also choose to view Member Name or MemberId by changing the Display drop-down selection.
You can use the filter within the column to scope down the display result. Please note these are cascading filters, which means the selection on the first filter causes the second to be limited to only those values that are now relevant. Use the Clear Filter icon in the top-left corner to clear the filters.
The bottom-right shows the total row count in the result table, the row count in PREVIEW display (if the total number of rows in the result table exceeds 1,000), and the duration of the refresh.
Preview tab can be refreshed even if the Rule is not in Edit mode.
SQL
The SQL tab displays the SQL query that is automatically generated from your design. This is a read-only tab.
Dimension
Select from the available Dimension Hierarchies in current application as the source.
SCOPE
There is a Show All check box on top right corner. When checked, you will be able to put scope on the system-defined technical columns of the dimension table.
For PREVIEW and SQL tab details, please refer to the Fact section.
Link
The available options in the Source drop-down are transform components from the data Rules that are in front of the current one in the Data Rule list.
For PREVIEW, SCOPE, and SQL tab details, please refer to the Fact section.
Comments
0 comments
Please sign in to leave a comment.