After upgrading to 6.7, the Run User Loading Procedures and Run Loading Procedures job steps in both the nightly RiskFabric Processing job and the RiskFabric Intraday Processing job fail and log the following error message:
Error=The MERGE statement conflicted with the CHECK constraint "CC_Organizations_SubOrgName_No_Forbidden_Characters". The conflict occurred in database "RiskFabric", table "dbo.Organizations", column 'SubOrgName'.
Release : 6.7
Component : Integration Wizard
The Risk Fabric console contains controls to prevent the insertion of SQL and MDX reserved characters in organization and sub-organization names. The following characters are considered invalid:
,;':/\\*|@?\"+=[]<>"
As of version 6.6 MP2, there were no controls to prevent these characters from being included in organization names that are bulk imported through a data source query job. Beginning with version 6.7, CHECK constraints have been added to the dbo.Organizations table to prevent these characters from being inserted into that table.
There are three options for working with this restriction:
The recommended workaround is to apply an import rule mapping formula to remove the invalid characters at the time data are moved from staging tables to core tables in the RiskFabric relational database.
To do this, edit the integration's import rule mapping to use a formula for the OrganizationAbbreviation, OrganizationName, and OrganizationSubOrgName fields. That formula will call a built-in function that is included with 6.7 (dbo.fnReplaceSpecialCharacters). The function will parse these three columns on each imported record and replace any instances of special characters with a space (or an empty string to effectively concatenate the org name - your choice).
For the Organizations entity type in the Integration Wizard, there are only four fields:
OrganizationAbbreviation (required)LastDetected (Optional)OrganizationName (Create and Associate Organizations)OrganizationSubOrgName (Create and Associate Organizations)To apply a formula to the non-date fields, follow these steps:
dbo.fnReplaceSpecialCharacters({SourceColumn},' ')
NOTE: If you wish to concatenate rather than use a space to separate the words in the string, simply remove the space between the two single quotation marks, like so:dbo.fnReplaceSpecialCharacters({SourceColumn},'')
Alternatively, you could also replace special characters with an underscore:dbo.fnReplaceSpecialCharacters({SourceColumn},'_')
Once the formula has been created, you need to apply it to the two remaining fields:
With these changes in place, the nightly job will apply the formula you've created and remove all special characters that violate CHECK constraints on these columns when merging records from the org staging table into the dbo.Organizations table.
Related knowledgebase article: Organization dashboards display no results