You can create a helper with the i-refactory helper wizard or manually. We advise you to use the i-refactory helper wizard because this ensures that all necessary artefacts are created. When you add an i-refactory helper the following happens:
{info}'Synchronized' means that the helper attribute is a replica of the original attribute. If you change the datatype of the original attribute, the datatype of the replica will change as well.
It is also possible to disable the synchronization between the replica and original attribute. For example, if you want to change the data type of an attribute in the helper entity. In this case, you can desynchronize a replicated attribute.
When you use a helper, make sure that you follow the good practice about implementing calculations in the technical staging layer and the good practice about implementing calculations within the context of the current delivery.
To create a helper:
i-refactory > Helper Entity > Generate Helper Starting from this table
.
Create Helper Entity...
appears. You can configure the helper.
Helper Entity Name
: name of the helper.Helper entity owner
: select the correct owner.Traverse Reference Paths
: when constructing a query from the starting point entity, should the reference paths be included?
unchecked
, the query is constructed from one entity only.checked
, the query is constructed by joining entities using all the references connecting entities.Include Parent Primary Key Columns
: should the primary key of any joint parent table be included in the select list of the query and helper entity?OK
. The helper entity appears in the diagram.Helper properties
appears.Columns
and assign one or more attributes as a primary key.
OK
.{warning} If a SQL expression is incorrect in your query, you will get an error during the metadata import in the i-refactory or data retrieval from the database. The i-refactory server does not check whether a SQL expression is correct during a data delivery.
When you join two or more entities to create a helper, then you need to manually create mappings for these additional entities.
{tip} A helper must have mappings on entity level. It doesn't require attribute-level mappings.
To add a mapping to a helper:
Tools > Mapping Editor...
. Mapping Editor
appearsOK
Suppose we want to implement a business rule for the order priority of an order:
Order priority
must be set to "2-HIGH".order priority
must be set to "3-MEDIUM".This rule can be implemented with a helper entity. The helper starts from the ORDERS
table. It will join with the parent tables NATION
and REGION
, to look up the country and the region of the order.
To add a business rule for the order priority of an order:
ORDERS
table. In the context menu, click on i-refactory > Helper Entity > Generate Helper Starting from this table
.Create Helper Entity...
appears
Order
table from the column list.O_ORDERKEY
column).ORDERS_CORRECTED
helper entity as the source entity for the logical model to include the calculated column.