Command Reference > infacmd Control Files > Import Control Files
  

Import Control Files

An import control file is an XML file that you use with infacmd commands. The control file filters the objects that infacmd imports from an export file into a domain or Model repository.
You can use an import control file with the following commands:
infacmd isp ImportDomainObjects
Imports native users, native groups, roles, connections, and cluster configurations from an export file into a domain. When you specify an import control file for the command, you can complete the following tasks:
infacmd oie ImportObjects
Imports Model repository objects from an export file into a Model repository. When you specify an import control file for the command, you can complete the following tasks:
Dependent Model repository objects may exist in different folders or projects. You must include all dependent objects using folderMap elements in the import control file. Otherwise, the import might fail with an error message because a dependent object does not exist in the target repository.
You can define a conflict resolution strategy through the command line or control file when you import the objects. The control file takes precedence if you define conflict resolution in the command line and control file. The import fails if there is a conflict and you did not define a conflict resolution strategy.
If you define the rename conflict resolution strategy, you can specify a name in the control file for a specific object. Or, infacmd can generate a name by appending a sequential number to the end of the name.
An import control file uses different parameters based on whether you configure the file to import domain objects or Model repository objects.

Import Control File Parameters for Domain Objects

Use the import control file parameters to configure the objects that you want to import from an XML file into the domain.
An import control file for domain objects can contain the following elements:
The following table lists the import control file elements that have configurable attributes:
Element
Attribute Name
Attribute Description
objectList
type
Required. Type of domain object that you want to import. Specify one of the following values:
  • - User
  • - Group
  • - Role
  • - Cluster configuration
  • - Connection
The value is not case sensitive.
objectList
select
Optional. Indicates whether infacmd imports all remaining objects of the specified type when you define an object element for the objectList. Set to all to import all remaining objects. For example, the following lines import Group1 with a Reuse resolution strategy. The lines import all remaining groups with a Merge resolution strategy:
<objectList type="group" select="all" resolution="merge">
<object name="Group1" resolution="reuse" />
</objectList>
If you define an object element and do not use the select attribute, then infacmd imports objects that satisfy the attributes defined in the object element. For example, the following lines import Group1 with a Merge resolution strategy:
<objectList type="group" resolution="merge">
<object name="Group1" />
</objectList>
If you do not define an object element for the objectList, then the default value of the select attribute is all. For example, the following line imports all groups with a Merge resolution strategy:
<objectList type="group" resolution="merge" />
Valid value is all.
objectList
resolution
Optional. Resolution strategy when a name conflict occurs. Applies to all objects of the specified type. Specify one of the following values:
  • - Replace. Replace target object with the source object.
  • - Rename. Rename source object using a generated name, and then import it.
  • You cannot use the Rename option with the cluster configuration type.
  • - Reuse. Reuse object in the target domain.
  • - Merge. Merge the objects into one object. This option is applicable for groups.
The values are not case sensitive.
object
name
Required. Name of a specific object to import of the specified object type. The value is not case sensitive.
object
resolution
Optional. Resolution strategy when a name conflict occurs for this object. Specify one of the following values:
  • - Replace. Replace target object with the source object.
  • - Rename. Rename source object, and then import it.
  • You cannot use the Rename option with the cluster configuration type.
  • - Reuse. Reuse object in the target domain.
  • - Merge. Merge the objects into one object. This option is applicable for groups.
The values are not case sensitive.
object
renameTo
Optional. Name to use when the conflict resolution strategy is Rename. If you do not specify a name, then infacmd generates a name by appending a number to the end of the name. Infacmd ignores the value if there are no conflicts or if the conflict resolution strategy is not Rename.
object
renameIdTo
Optional. ID string to use when you import a connection object and the conflict resolution strategy is Rename. If you do not specify a connection ID, then infacmd generates an ID by appending a number to the end of the connection ID. Infacmd ignores the value if there are no conflicts or if the conflict resolution strategy is not Rename.

Import Control File Sample for Domain Objects

The following code shows an example import control file for domain objects:
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<importParams xmlns="http://www.informatica.com/oie/importControl/9">

<! -- Import all connections, roles, and users. -->
<objectList type="connection" resolution="replace" />
<objectList type="role" resolution="reuse" />
<objectList type="user" resolution="rename" />

<! -- Import specific groups. -->
<objectList type="group">
<object name="g1" resolution="replace" />
<object name="g2" resolution="merge" />
</objectList>
</importParams>

Import Control File Parameters for Model Repository Objects

Use the import control file parameters to configure the objects that you want to import from an XML file into the Model repository.
An import control file for Model repository objects can contain the following elements:
The following table describes the configurable attributes for the folderMap element in the import control file:
Attribute Name
Attribute Description
sourceProject
Required. Name of the source project in the export file that contains the objects you want to import. The value is not case sensitive.
sourceFolderPath
Optional. Path of the source folder in the export file that contains the objects you want to import. Use the following format:
"/<folder_name>/<folder_name>"
For example, if a project contains a folder named F1, then the folder path of F1 is "/F1." To consider importing all objects in the project, specify "/." The value is not case sensitive. Default is "/."
targetProject
Required. Name of the project in the target repository into which you want to import objects. The project must exist in the repository before you import the objects. The value is not case sensitive.
targetFolderPath
Optional. Path of the folder in the target repository into which you want to import objects. Use the following format:
"/<folder_name>/<folder_name>"
For example, if a project contains a folder named F1, then the folder path of F1 is "/F1." To import all objects into the target project, specify "/." The folder must exist in the repository before you import the objects. The value is not case sensitive. Default is "/."
recursive
Optional. Indicates whether to import objects from subfolders of the specified folder. Set to true to import from subfolders. Valid values are true and false. The value is case sensitive. Default is true.
select
Optional. Indicates whether infacmd imports all remaining objects in the specified project when you define an objectList element for the folderMap. Set to all to import all remaining objects. For example, the following lines import mappings with a Reuse resolution strategy. The lines import all remaining objects with a Replace resolution strategy:
<folderMap sourceProject="p1" targetProject="p2" select="all" resolution="replace">
<objectList type="Mapping" resolution="reuse" />
</folderMap>
If you define an objectList element and do not use the select attribute, then infacmd imports objects that satisfy the attributes defined in objectList. For example, the following lines import mappings with a Replace resolution strategy:
<folderMap sourceProject="p1" targetProject="p2" resolution="replace">
<objectList type="Mapping" />
</folderMap>
If you do not define an objectList element for the folderMap, then the default value is all. For example, the following line imports all objects with a Replace resolution strategy:
<folderMap sourceProject="p1" targetProject="p2" resolution="replace" />
Valid value is all.
resolution
Optional. Resolution strategy when a name conflict occurs. Applies to all objects in this folder. Specify one of the following values:
  • - Rename. Rename source object using a generated name, and then import it.
  • - Replace. Replace target object with the source object.
  • - Reuse. Reuse object in the target Model repository.
  • - None.
The values are not case sensitive. Default is none.
The following table describes the configurable attributes for the objectList element in the import control file:
Attribute Name
Attribute Description
type
Required. Type of Model repository object to import to the specified folder path. Valid values include all object types present in the Model repository. You can view the type of the object in the Properties view in the Developer tool. For example, you can enter "Relational Data Object" or "Profile." The value is not case sensitive.
select
Optional. Indicates whether infacmd imports all remaining objects of the specified type when you define an object element for the objectList. Set to all to import all remaining objects. For example, the following lines import MyMapping with a Reuse resolution strategy. The lines import all remaining mappings with a Replace resolution strategy:
<folderMap sourceProject="p1" targetProject="p2">
<objectList type="Mapping" select="all" resolution="replace">
<object name="MyMapping" resolution="reuse" />
</objectList>
</folderMap>
If you define an object element and do not use the select attribute, then infacmd imports objects that satisfy the attributes defined in the object element. For example, the following lines import the mapping named MyMapping with a Replace resolution strategy:
<folderMap sourceProject="p1" targetProject="p2">
<objectList type="Mapping" resolution="replace">
<object name="MyMapping"/>
</objectList>
</folderMap>
If you do not define an object element for the objectList, then the default value is all. For example, the following lines import all mappings with a Replace resolution strategy:
<folderMap sourceProject="p1" targetProject="p2">
<objectList type="Mapping" resolution="replace" />
</folderMap>
Valid value is all.
resolution
Optional. Resolution strategy when a name conflict occurs. Applies to all objects of the specified type. Specify one of the following values:
  • - Rename. Rename source object using a generated name, and then import it.
  • - Replace. Replace target object with the source object.
  • - Reuse. Reuse object in the target Model repository.
  • - None.
The values are not case sensitive. Default is none.
The following table describes the configurable attributes for the object element in the import control file:
Attribute Name
Attribute Description
name
Required. Name of a specific object to import of the specified object type. The value is not case sensitive.
resolution
Optional. Resolution strategy when a name conflict occurs for this object. Specify one of the following values:
  • - Rename. Rename source object, and then import it.
  • - Replace. Replace target object with the source object.
  • - Reuse. Reuse object in the target Model repository.
  • - None.
The values are not case sensitive. Default is none.
renameTo
Optional. Name to use when the conflict resolution strategy is Rename. If you do not specify a name, then infacmd generates a name by appending a number to the end of the name. Infacmd ignores the value if there are no conflicts or if the conflict resolution strategy is not Rename.
renameIdTo
Optional. ID string to use when you import a connection object and the conflict resolution strategy is Rename. If you do not specify a connection ID, then infacmd generates an ID by appending a number to the end of the connection ID. Infacmd ignores the value if there are no conflicts or if the conflict resolution strategy is not Rename.
The following table describes the configurable attributes for the rebind element in the import control file:
Attribute Name
Attribute Description
source
Required. Name of a source connection in the file that you are importing. The value is not case sensitive.
target
Required. Name of a connection in the target Model repository to map to the source connection. By default, the connection must exist in the target repository before you import the objects. If the connection does not exist, the import fails. When you run infacmd, you can choose to skip target connection validation during the import. When you skip target connection validation, the import succeeds if a connection does not exist in the target repository. The value is not case sensitive.

Import Control File Sample for Model Repository Objects

The following code shows an example import control file for Model Repository objects:
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<importParams xmlns="http://www.informatica.com/oie/importControl/9">
<folderMaps>
<folderMap sourceProject="project1" sourceFolderPath="/f1" targetProject="project2" targetFolderPath="/f1" recursive="true">

<! -- Import mapping1 with the Rename resolution strategy. -->
<objectList type="Mapping" select="all" resolution="replace">
<object name="mapping1" resolution="rename" renameTo="mapping1_new"/>

<! -- Import all remaining mappings with the Replace resolution strategy. -->
</objectList>

<! -- Import all Aggregator transformations with the Replace resolution strategy. -->
<objectList type="Aggregator" resolution="replace"/>

<! -- Import all Filter transformations with no resolution strategy. -->
<objectList type="Filter" resolution="none"/>
</folderMap>
</folderMaps>

<! -- Map connections in the source repository to connections in the target repository. -->
<connectionInfo>
<rebindMap>
<rebind source="src_Conn1" target="tgt_Conn1"/>
<rebind source="src_Conn2" target="tgt_Conn2"/>
</rebindMap>
</connectionInfo>
</importParams>