Custom Attributes for Dimensions¶
This page deals with how to create custom attributes for a Dimension.
Custom attributes are added in IFS Cloud Web and can be done by any end user having necessary privileges. All functionality related to Dimension specific custom attributes can be found in Solution Manager as a part of the Information Sources framework.
The following prerequisites must be met to be able to create custom attributes for a Dimension:
- The user must have access to the Custom Attributes for Dimensions window.
- Necessary source relations must have been created and approved.
- The user must have authorization to Approve and Publish custom attribute definitions.
- Custom Attributes based on source types Select Statement, Function Call and Expression require that the end user has the system privilege DEFINE_SQL
Defining Custom Attributes¶
Custom attributes are defined in the Custom Attributes for Dimensions page. Query for the requested Dimension, e.g. DIM_ACCOUNT. If Relations Defined shows as not defined, it is not possible to define any custom attributes. The remedy is to open the Relations for Dimensions page and create the needed relations and approve them for the Dimension before defining custom attributes.
Once there are approved relations the window should look like below.
Next step is to define the custom attributes. This is done in the detail section.
The following custom attributes will be added in this example:
- The association number related to a company by using the source type View and the source view COMPANY
- The company name by using the source type Table and the source table COMPANY_TAB
- The company name by using a select statement, i.e. source type Select Statement
Some detailed information about the detail section:
|Source ID||The identity of the custom attribute source as defined in the Relations for Dimensions page|
|Source Type||The source type as defined for the relation to be used|
|Source Column Name||The name of a column in the source if the source type is View, IAL View or Table
An attribute reference if the source type is Dimension or Fact
For source types Select Statement, Function Call and Expression, a column name should not be specified.
|Date Type||Data type of the custom attribute|
|Attribute Name||The name of the custom attribute when added to the Dimension. Only uppercase characters are allowed. No spaces can be used. Possible characters are also limited.
The resulting Dimension Item Id will be <Dimension ID>.<Attribute Name> e.g. DIM_ACCOUNT.COMP_NAME
|Display Name||The display name of the custom attribute in the Information Source navigator in e.g. IFS Business Reporter.|
|Display Folder||The name if the folder in the Information Source navigator where the custom attribute should appear. The Display Folder always defines a sub level to the dimension attribute folder.|
|Read Only in Data Mart||If the Dimension supports incremental load, it is important to specify if the custom attribute should be stored in the database or not. By default this check box is not selected, meaning that the custom attribute will be stored in a special incremental table dedicated for custom attributes for the current entity. If the check box is selected, the attribute will not be stored in the database, only added as read-only attribute in the access view.
A typical case is when the value of the attribute is dependent of the context, e.g. current user, current language. For this case the attribute should be defined as a read-only attribute.
|Approved||Selected when the definition has been approved.|
|Synchronized||Selected as long as the referenced relations or the published custom attributes are unchanged.|
Once the custom attributes have been defined, the next step is approval. Two levels have to be considered:
- In the detail section, approve the custom attribute definitions that should be published.
This is done via command Approve
- Before the custom attributes can be published and created, it is necessary to approve on entity level. Approving on this level makes all approved attribute definitions available for publishing.
Handle this by using the command Approve in the header.
If we decide to add the defined attributes, use command Approve for each row and then perform Approve on the entity level.
Publish Custom Attributes¶
The last step is to publish the approved custom attribute definitions and this requires approval on both attribute and entity level.
Publishing is simply done via the command Publish on the entity level.
Publishing leads to:
- The approved custom attributes will be added to the Dimension entity and will be directly available in the Information Source navigator in e.g. IFS Business Reporter and IFS Lobby.
- New database objects will be created, e.g. new source views.
- An existing Access View related to the current entity was found. The view will not be modified by default. Please refer to Overview Custom Attributes for Information Sources.
- The entity will be defined as Published.
- The entity level is defined as Synchronized. It mean that all approved custom attributes are all synchronized.
- Each approved custom attribute will be defined as Synchronized.
If there is a need to find out what happened during the publishing step, please check the Information Sources - Installation Log window.
The following error might appears during publishing:
The reason is most likely that a relation based on type SQL Expression has been defined using column references in the expression without an alias definition.
E.g. the expression SITE || ' - ' || DESCRIPTION instead of d.SITE || ' - ' || d.DESCRIPTION
Please refer to dimension relations for more info.
The framework keeps track of changes related to the source relations for all approved custom attributes.
Say e.g. that the relation based on the view COMPANY has changed. This leads to the following:
- The custom attribute NAME is no longer Synchronized
- The entity level is not Synchronized, thus indicating that something has happened with the custom attribute related configurations that should be investigated. If needed, the definitions might have to be modified and republished.
Invalid Custom Views¶
If a custom source views related to a Dimension are no longer valid, this is indicated by Errors Exist in the Dimension Info group in the Custom Attributes for Dimensions page.
Core attribute removed or data type of core attribute is changed.
- One or more custom attributes created based on the core attribute.
- A core update of the Dimension removes one of the previously existing core attributes.
- During Dimension metadata deployment the custom source views will get invalidated.
If it is indicated that Errors Exist it is important to republish the custom attributes for the Dimension. This is done by performing:
Some related information can be found in the Monitoring - Diagnostics section on the Overview - Custom Attributes for Information Sources page.
Redefining or Removing Custom Attributes¶
If custom attribute definitions for a Dimension entity have to be modified, the first steps will be to:
- Perform Unpublish on header/entity level.
This action will drop all previously created data base objects and finally drop the custom attributes.
- Perform Disapprove on header/entity level.
When the above actions are done the custom attribute definitions can be modified.
- Removing custom attributes
- To remove a custom attribute definition, first the definition must be Disapproved.
- Next the definition can be removed.
- Modifying/redefining custom attributes
- In most cases the attribute definition should first be Disapproved
- A modification can e.g. be to specify that an attribute should be a measure instead of a light item.
- If it is only the used relation definition that has to be modified, that definition can be modified separately without even disapproving the attribute definition.
- Approve the definition once done with the modifications.
- Adding new custom attributes
- Add any number of custom attributes as described previously and make sure to approve the definitions to be published.
When the changes have been made, the actions are as before:
- Approve on entity level
- Publish on entity level
Visualizing Custom Attributes¶
When custom attributes have been added to a Dimension, it is possible to find out in the Dimensions page if a Dimension has custom attributes and also which attributes that have been added.
Dimensions with added custom attributes are in the Dimensions page marked with Yes in the Customized column.
Dimension items are also marked with Yes if customized.
Export and Import¶
The page Custom Attributes for Dimensions provides the possibility to export and import relations and custom attributes.
The commands Export and Import are available in the header.
The export will consider:
- All relations defined for the entity regardless of if they have been approved or not
- All custom attribute definitions defined for the entity regardless of approval or publishing
The content is exported as a XML file.
The import option takes a previously exported XML file and imports the custom attributes and relations. Import will not succeed if a relation or attribute to be imported already exists.
This functionality can be used when moving custom attribute definitions from one environment to another.
When the metadata of a Dimension is deployed, e.g. through a bug correction or an update, the custom attributes will still be available after the deployment process has ended. This is not the case if a new attribute or any other changes are made e.g. through the Information Sources feature.
Through the Information Sources feature it is possible to modify custom attributes of a Dimension and also to reference added custom attributes as part of the entities metadata, e.g. adding parameter functions for a custom attribute, using a custom attribute as part of a LoV definition. Generally, all it will be made sure that these definitions are kept after having deployed the metadata of the entity.
Custom attributes that are based on the source type Select Statement or Function Call or based on other source types but using the join type Sub Select, will generally have a bigger impact on performance than attributes where an outer join is performed between the original source and the referenced source. Read performance can be affected but might also be good enough. The big problem is when a custom attribute is used as a conditional attribute, easily leading to bad performance.