Map Source Columns¶
When transferring data from an external system (or another IFS installation) into IFS, it is necessary for IFS/Data Migration to know where the data will be retrieved from and where it should go to. To do this mapping you can use the Maintenance/Source Mapping tab to map columns from the data source to the columns in the target view to define what old column goes into what IFS column. If a value is required in IFS but does not exist in the old system, you define standard values for the columns. If the old system supply values in a column that does not correspond to IFS basic data or pre-defined values, you can specify a conversion list allowing the old system to supply one value and IFS to transform the value into a new, valid value.
Normally, columns will automatically be created in this window through the methods in the method list or by specifying an IFS View Name and a Source Name in the migration job header. This means that you normally only map columns/specify default values during this activity.
- A migration job header must have been created. The creation of the header may or may not have resulted in columns already defined in the source mapping tab.
If columns has already been created from view name in the job header or from the method list:
- For all columns listed that have a related column in the source-table, enter the correct name of the database column name in the source (LOV available).
- For all mandatory columns listed that have no Source Column specified and have no related column in the source-table, make sure that a default value is specified.
- Remove columns that should not be used in this job at all. Do not remove any columns that is a Key column or is a Mandatory column.
- Insert additional columns that are wanted or present in the source, but are not listed in the column mapping table. You may also specify dummy-columns with specific values that you want to use to limit execution of a method in the Method List. See also Added Columns below.
- Save your changes.
- Optionally add more information about the column like comments in the comment column to document the mapping that has been done, and a conversion list for value conversion.
If the Source Mapping tab is blank or lacking the column you need to map:
- Check if the columns could be easily inserted by adding a new method in the method list. It is preferred to allow IFS/Data Migration to automatically create the columns in this window, and then configure them here later. If automatic creation is impossible, follow the steps in the list.
- Choose New.
- Enter a position for the new column.
- Enter a name for the column.
- Enter a description of the column.
- Enter the columns data type.
- Enter the corresponding column from the source-table or a standard value.
- Save the new column.
- Optionally add more information about the column like comments or a conversion list.
The column NEW_MASTER will always be added to the attr-string of your SELECT-statement.
This column is useful if you have defined a select that is a JOIN of a MASTER/DETAIL relation, where values from the MASTER table will be duplicated for each detail row.
It is the first key-columns (flags equal 'P' or 'K') on top of your column list that is defined as MASTER.
When the SELECT is executed, the value of MASTER columns is checked for each row, and the column NEW_MASTER will contain value 'TRUE' for each new occurrence of MASTER, otherwise its value will be 'FALSE'.
See how you can use this column information in Method List.