PostgreSQL Connector > Migrating a mapping > Use a different object path for the migrated mapping
  

Use a different object path for the migrated mapping

After you migrate the mapping, you can use a different object path to run the mapping from the new environment.
In this scenario, before you migrate the mapping, you can change the object metadata or the runtime attributes to reflect the object path in the migrated environment. You do not have to edit or update the mapping in the new environment.
As a rule, when you specify the schema and table in the advanced properties or object properties, Data Integration honors the attributes in the following order of precedence:
  1. 1. SQL override. The SQL statement to override the default query generated from the specified source type in the Source or Lookup transformation in a mapping.
  2. 2. Custom query. The SQL statement to reduce the number of columns to query in the Source or Lookup transformation in a mapping.
  3. 3. Runtime advanced attributes. The advanced properties such as schema name and table name in the Source, Target, or Lookup transformation in a mapping.
  4. 4. Connection attributes.The schema attribute in the connection properties.
  5. 5. Object metadata. The object type selected in the Source, Target, or Lookup transformation in a mapping.

Migration options

When you migrate, you can choose from one of the following options to update the object path:

Option 1. Update the connection properties to reference the new object

When you import the mapping into Org 2, in the Review Connections section, you can change the existing connection to map to the connection that has access to the specified schema and table in Org 2.

Option 2. Override the properties from the advanced properties

Before the migration, specify the required schema and table name for the object from Org 2 in the advanced properties of the Org 1 mapping.
After the migration, when you run the mapping, the Secure Agent uses the configured advanced parameters to override the object specified in the mapping imported from Org 1.

Option 3. Parameterize the properties in the mapping

You can choose to parameterize the advanced attributes, such as the schema and table name before the migration. You can configure input parameters, in-out parameters, and parameter files in the mapping.
If you have used in-out parameters, you can change the schema and table attributes using the parameter file so that the changes are applied when the task runs.
You cannot override the input parameters from the parameter file in the advanced properties. You must use the in-out parameter to override the value from the parameter file.
Parameterizing only the advanced properties, but not the object in the mapping
If you want to parameterize only the advanced properties and use them at runtime, select a placeholder object in the object properties in the mapping and then specify an override to this placeholder object from the advanced properties. Ensure that the placeholder object contains the same metadata as the corresponding table that you specify as an override. When you run the mapping, the value specified in the advanced property overrides the placeholder object.
Parameterizing both the object and the advanced properties
If you want to keep both the PostgreSQL object type and the advanced fields parameterized, you must leave the Allow parameter to be overridden at runtime option unselected in the input parameter window while adding the parameters, and then select the required object at the task level. When you run the task, the values specified in the advanced properties take precedence.

Rules and guidelines for migrating a mapping

Consider the following rules and guidelines when you use the same or a different object path for the migrated mapping: