Defining Import Rules

Import rules are used to transform data from the external application to a format that is appropriate in CloudSuite Industrial.

Table column rules can be created automatically or manually:

  • Rules are created automatically when you perform a  preliminary data transfer. The migration utility compares the source table column attributes such as length and data type with the target table column attributes. If the utility determines that the existing data cannot be moved into the target table column because of a mismatch in attributes, the utility tries to create a rule based on the properties of the Source and Target columns that allows it to move the data.

    These types of rules can be automatically created by the migration utility, as needed:

    • 1: Renew value. This rule is set when the existing value in the external application table column is not appropriate for the mapped CloudSuite Industrial table column's data type. A new value is created when the data is saved in CloudSuite Industrial. For this type of rule, the existing values from the source table/column are displayed in the Import Table Column Rule Definition form, and you specify replacement values for each existing value.
    • 2: Default value. This rule is set when the data in the external application table column is not required but data is required in the mapped CloudSuite Industrial table column. For this type of rule in the Import Table Column Rule Definition form, you specify a default value to use in the target table column when a value is not provided by the external application.
    • 3: Update references to modified data. This rule is used to update columns that reference data in another table. If the original value is changed, then all reference values can be changed to the new value. For example, an account number is used in multiple tables. When you update the account number in the acct table, the referenced table column's value is also updated if it is defined in this rule.
    • 4: Set up account number and unit codes. This rule is used to define the mappings to the CloudSuite Industrial account number and unit codes.

    During the preliminary data transfer, if a possible problem  is discovered while mapping external application data into the target table, the table column is flagged and one of the three system import rules is assigned to rectify the offending data. You can see the new rule in the Import Table Column Rule Definition form. If the System Default flag is selected for a rule on the Import Rule Definition form, that rule was generated by the system during the preliminary data transfer.

  • If the generated system rule does not solve the problem, repeating the data transfer will not be possible. In that case, you can create an additional import rule manually on the Import Rule Definition form, and then define the specific table columns that the rule applies to in the Import Table Column Rule Definition form. In order to support the transfer when you create a manual rule, you must also provide additional custom stored procedures to handle the new rule. Then execute your stored procedures inside the specified block of the ApplyImportRuleSp stored procedure. Contact Infor Consulting Services to create new custom stored procedures to support the new rule.

In this example, the utility attempts to transfer data from  Table A, Column A to the mapped Table B, Column B:

Source data (Column A) Column A data type Target data (Column B) Column B data type Transfer successful?
CO1 nvarchar(10) CO1 nvarchar(5) Yes
CO2 nvarchar(10) CO2 nvarchar(5) Yes
CO11111 nvarchar(10)   nvarchar(5) No

Because it could not transfer all of the data from Column A to Column B, the transfer for this sequence fails and generates a rule of type 1. In the Import Table Column Rule Definition form, you then provide a replacement value that will work. In this example, you would rename the CO11111 value to something that is five characters or less. Ensure that no other record uses that value and that it is not a primary or unique key column.

Related topics