Migrating Objects Using CSV Files

This section explains how to migrate objects using export_input.csv file and import_input.csv file. These files are present in $FIC_HOME/utility/Migration/conf folder. This folder also contains migration.properties file and OBJECTMIGRATION.xml file. You need not make any entry in the OBJECTMIGRATION.xml file.

To migrate objects, perform the following steps:

1.      Navigate to the $FIC_HOME/utility/Migration/conf folder

2.     Populate the migration.properties file with appropriate values as explained in the following table.

The values in the properties file are updated by the installer. If you want to run this utility from another location, the values should be specified accordingly.

 

Name

Description

EXPORTIMPORT_BASEPATH

Absolute path of the directory where the metadata/ archive and metadata/ restore folders are created.

For example:

EXPORTIMPORT_BASEPATH= /scratch/ofsaaweb/OFSAAI/utility/Migration

FIC_HOME

OFSAAI installation directory.

For example: FIC_HOME /scratch/ofsaaweb/OFSAAI

READ_FROM_CSV

Specify whether to read the inputs from CSV files or OBJECTMIGRATION.xml file.

Set this as Y. Then the utility reads from export_input.csv file for exporting objects or from import_input.csv file for importing objects.

USERID

Specify the user ID of the OFSAAI user who will be running the migration utility. Ensure the user is mapped to the specific source Information Domain / Segment.

The user id should be provided in capital letters.

Note: The User ID or Service accounts are “SMS Auth Only” in case of SSO and LDAP configured setups.

LOCALE

Set this as en_US.

INFODOM

Specify the Information Domain from where objects need to be exported/ imported.

The information domain name should be provided in capital letters.

FOLDER

This is applicable only for importing.

Specify the Code of the folder /segment to which you need to import objects. The folder value should be provided in capital letters.

If IMPORTALL_TARGET_FOLDER is not specified in case of IMPORTALL=Y, then the objects are imported to this FOLDER.

MODE

Set the mode of the operation as:

EXPORT - for exporting objects

IMPORT for importing objects

DUMP_FILE_NAME

For exporting, specify the name of the file to be exported which will be created under $FIC_HOME/utility/Migration/metadata/archive folder as a .DMP file.

For importing, specify the name of the file to be imported, which is present under $FIC_HOME/utility/Migration/metadata/restore folder.

IMPORTALL

Y indicates that all exported objects in the .DMP file (dump) will be imported (regardless of any specific OBJECT entries in the import_input.csv or OBJECTMIGRATION.XML file).

N indicates that only objects explicitly specified in the import_input.csv or OBJECTMIGRATION.XML file will be imported (provided they are already exported and available in the dump file).

Note: When migrating Sandbox, IMPORTALL should be N.

IMPORTALL_TARGET_FOLDER

Specify the target folder to which you want to import objects when you specify IMPORTALL as Y. If this is not specified, it imports the objects to FOLDER.

FAILONERROR

Specify whether to fail operation on any error.

Y - Stops the import process if there is any error.

N - Continues with the next object in the import process even if there is an error.

OVERWRITE

Specify whether to overwrite any existing metadata.

Y - Overwrites metadata even if the metadata already exists.

N - Will not overwrite the object if it already exists and continue migrating the next object.

RETAIN_IDS

Specify whether to retain the source AMHM objects after migration.

Y – Retain the Source AMHM object IDs.

N – Will not retain the Source AMHM object IDs.

If you have chosen the value 'Y' for RETAIN_ID and the Target system does not consume the object ID of the Source object, the ID will be retained while migration. If the object in the Target system consumes the object ID of the Source, the ID will not be retained while migration. Instead, it will generate a new ID.

MIGRATION_CODE

Enter the unique migration code to identify the status of the migration process.

For example: 8860

 

3.     Update import_input.csv or export_input.csv files based on whether you want to import or export objects as explained in the following tables:

 

NOTE

Any updates done are available in the export_input_template.csv and import_input_template.csv files. Before invoking the command line utility, ensure that the updates available in the templates files are available in the export_input.csv and import_input.csv files.

 

For Exporting Objects

Following are the entries in the export_input.csv file:

 

Column Name

Description

Object Code

Specify the object Code which should be a unique identifier of the definition based on the Object Type. It should be either system generated or user defined unique code. See the Objects Supported for Command Line Migration section to know for a particular object whether the code is user defined or system generated.

You can specify the object Code value as wildcard “*” if you are migrating all objects of that Object Type.

Object Type

Specify the Type ID of the required metadata objects to be exported. Refer to the Objects Supported for Command Line Migration section.

Object Sub Type

SubType is available for Filters and AMHM hierarchy only. This is a mandatory field.

For filters, SubType indicates the type of the filter. For hierarchies, this indicates the Dimension ID.

See the table for filter SubTypes.

Sandbox Infodom

Specify the Sandbox Information Domain name to export Sandbox.

With Models

Specify Y if you want to export all models present in the Sandbox Infodom along with the Sandbox.

Specify N if you want to export only the Sandbox.

Include Dependency

Specify Y if you want to export all dependent objects along with the base objects.

Specify N if you want to export only the mentioned object.

Include Instances

This is applicable only for PMF migration.

Specify Y if you want to export Questionnaire related workflow instance data.

Is Response Data Required

This is applicable only for Questionnaire migration.

Specify Y if you want to export the responses for Questionnaire.

Specify N if you want to skip it.

Application Code

This is applicable only for Questionnaire migration.

Specify the application code for which you want to export the Questionnaire data. For example, to migrate KYC related Questionnaire data, specify the application code OFS_KYC. Similarly, you can specify the application code for other applications and migrate the related Questionnaire data.

 

4.    After entering the required details of the objects you want to export in the export_input.csv file, navigate to $FIC_HOME/utility/Migration/bin path and execute ObjectMigration.sh. The dump file will be created, which will have an import_input.csv with list of all objects (including dependent ones) that are being exported.

5.     Once executed, you can view the related log files from the $FIC_HOME/utility/Migration/logs location.

For Importing Objects

Following are the entries in the import_input.csv file:

 

Column Name

Description

Object Code

Specify the object Code which should be a unique identifier of the definition based on the Object Type. It should be either system generated or user defined unique code. See the Objects Supported for Command Line Migration section to know for a particular object whether the code is user defined or system generated.

You can specify the Object Code value as wildcard “*” if you are importing all objects of that Object Type.

Note: Specify only those Codes that are present in the exported dump file.

Object Type

Specify the Type ID of the required metadata objects to be imported. See the Objects Supported for Command Line Migration section for Object Type IDs.

Object Sub Type

SubType is available for Filters and AMHM hierarchy only. This is a mandatory field.

For filters, SubType indicates the type of the filter. For hierarchies, this indicates the Dimension ID.

See the table for filter SubTypes.

Sandbox Infodom

Specify the Sandbox Information Domain name to import Sandbox.

With Models

Specify Y if you want to import all models present in the Sandbox Infodom along with the Sandbox.

Specify N if you want to import only the Sandbox.

Include Dependency

Specify Y if you want to import all dependent objects along with the base objects.

Specify N if you want to import only the mentioned object.

Is Base Object

This attribute is for information and is not read while processing the input. This will be set as Y if the exported object is a base object and will be N for all the exported dependent objects.

Object Group and Object Group Target Folder

Specify a unique ID to the Object Group and the folder to which you want to import all the objects in that Object Group.

If Object Group is not specified, by default it takes the object group ID of the preceding entry with Object Group. If the object group ID for the first entry is not explicitly entered, it is assigned the value as ‘1’.

If object Group ID is specified and Object Group Target Folder is kept blank, the objects of that Object Group will be imported to the folder mentioned in the FOLDER tag in the migration.properties file. If that is also not mentioned, it will be imported to the source folder mentioned in the dump file.

Note: An object with an Object Group ID different from the preceding object will go to a new group. Hence, enter all the objects which you want to import to the same folder successively.

Include Instances

This is applicable only for PMF migration.

Specify Y if you want to import questionnaire related workflow instance data.

 

6.    Once you have updated the files with required information in the target environment:

§       Create metadata/ restore folder under $FIC_HOME/utility/Migration directory (if not present).

§       Copy the exported .DMP file that needs to be imported to $FIC_HOME/utility/Migration/metadata/restore folder.

§       Navigate to $FIC_HOME/utility/Migration/bin path and execute ObjectMigration.sh.

7.     Once executed, you can view the related log files from the $FIC_HOME/utility/Migration/logs location.

Sample import_input.csv

mig_group_001 and mig_group_002 belong to Group 1 and they will be imported to folder EMFLD.

mig_group_003 and mig_group_004 belong to group 2 and they will be imported to folder IPEFLD.

mig_group_005 will be imported to the default folder set under <FOLDER> tag.

mig_group_006 will be imported to the default folder set under <FOLDER> tag even though the Object Group ID is same as that of mig_group_001. If you want mig_group_006 to be imported to the same folder (EMFLD), then either you have to explicitly give the Object Group Target Folder along with Object Group or mig_group_006 entry should be inserted before a change in the User Group ID. That is, in the previous example, before the entry for mig_group_003.

 

NOTE

If nothing is specified for Include Dependency column, all the dependent objects are exported.