Control File Examples for Model Repository Objects
You can filter the export of Model repository objects by time or user. You can filter the export or import of Model repository objects by object type or object name.
- Export Model Repository Objects by Time
To export all objects in a folder named Folder1 that were created before 2011-02-01 16:00:00-0800, you might create the following control file:
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<exportParams xmlns="http://www.informatica.com/oie/exportControl/9">
<folders>
<folder path="/Folder1" createdBefore="2011-02-01 16:00:00-0800" />
</folders>
</exportParams>
- Export Model Repository Objects by User
To export all objects in the project last updated by Administrator, you might create the following control file:
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<exportParams xmlns="http://www.informatica.com/oie/exportControl/9">
<folders>
<folder lastUpdatedBy="Administrator" />
</folders>
</exportParams>
- Export and Import Model Repository Objects by Type
To export all mappings from a folder named Folder1, you might create the following control file:
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<exportParams xmlns="http://www.informatica.com/oie/exportControl/9">
<folders>
<folder path="/Folder1" />
<objectList type="Mapping" />
</folder>
</folders>
</exportParams>
You want to export all mappings created by user2 and export all remaining objects created by user1. The createdBy attribute defined for the child objectList element overrides the same attribute defined for the parent folder element. You might create the following control file:
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<exportParams xmlns="http://www.informatica.com/oie/exportControl/9">
<folders>
<folder path="/Folder1" select="all" createdBy="user1" />
<objectList type="Mapping" createdBy="user2" />
</folder>
</folders>
</exportParams>
You want to import all mappings from the export file. Some of the mappings exported from Folder1 contain dependent objects that existed in Folder2 in the source repository. To import dependent objects, you must include all dependent objects using folderMap elements in the import control file. You also want to map the connections in the source repository to connections in the target repository. You might create the following control file:
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<importParams xmlns="http://www.informatica.com/oie/importControl/9">
<folderMaps>
<folderMap sourceProject="DevProject" sourceFolderpath="/Folder1" targetProject="TestProject" targetFolderPath="/TestFolder1" resolution="reuse">
<objectList type="Mapping" />
</folderMap>
<folderMap sourceProject="DevProject" sourceFolderpath="/Folder2" targetProject="TestProject" targetFolderPath="/TestFolder2" resolution="reuse" />
</folderMaps>
<connectionInfo>
<rebindMap>
<rebind source="src_connection1" target="tgt_connection1" />
<rebind source="src_connection2" target="tgt_connection2" />
</rebindMap>
</connectionInfo>
</importParams>
- Export and Import Model Repository Objects by Name
You want to export a mapping named TestMapping that was created after 2010-11-11 23:59:59-0800. You want to export all remaining objects in the same folder. You might create the following control file:
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<exportParams xmlns="http://www.informatica.com/oie/exportControl/9">
<folders>
<folder path="/Folder1" select="all" />
<objectList type="Mapping" createdAfter="2010-11-11 23:59:59-0800" >
<object name="TestMapping" />
</objectList>
</folder>
</folders>
</exportParams>
An export file contains flat file and relational data objects. You want to import the flat file data object named NewFlatFileDataObject and all relational data objects from the export file. You might create the following control file:
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<importParams xmlns="http://www.informatica.com/oie/importControl/9">
<folderMaps>
<folderMap sourceProject="SampleProject" targetProject="SampleProject"
targetFolderPath="/TestFolder">
<objectList type="Flat File Data Object" resolution="replace" >
<object name="NewFlatFileDataObject" />
</objectList>
<objectList type="Relational Data Object" resolution="replace" />
</folderMap>
</folderMaps>
</importParams>