Using pmrep to import an Informatica folder

Here’s the companion script for the “Using pmrep to export an Informatica folder” article. Use this script to import objects into PowerCenter.

One use for scripting an import would be to schedule it during off hours, for example moving development code to production during off hours. You may also need to export some objects, then do a "mass change" or Find/Replace on the XML file, then export them back in (for example, export all sessions, find/replace a connection).

Overview of ObjectImport
Here is the basic object import syntax:

pmrep objectimport -i m_mapping_name.xml  -c import_Infa_Objects_Control.txt

The pmrep objectimport function is easy to use, it is a little different however, in that you are required to use a “control file”, designated by the "-c", to define what PowerCenter folder and repository the objects will be imported into. There is an example Control File at the end of the article with important sections highlighted.

You must also use the control file to specify how to resolve conflicts, “Replace”, “Reuse”, etc., (see the RESOLVECONFLICT section). You can choose the option to generically “replace” all objects or you can specify Replace or Reuse by object type as defined in the TYPEOBJECT keyword, for example in the control file below, I choose to replace workflows but reuse schedulers.

Optionally, using the keyword TYPEFILTER, you can use the control file to filter which object types will get imported (applicable if you have a folder with many objects and various object types but only need to import a subset of those)


My script has two imports options, one to import a single object and the other option will loop over a folder containing multiple objects to import , you can use either one depending on your requirement, just comment out the object import you don't need. Download the script and control file here

Example Control File


A word of caution, if you export Mappings that have SAP ABAP and import them back into the repository, replacing the mapping, you may have an issue where the mapping save time is newer than the ABAP generation time and the session will no longer run.

Thank you for your support


IMPORTANT,  YOU are responsible for backing up your systems before trying or implementing any suggestions from this blog. I do not guarantee 100% accuracy of any code examples. I do not presume to know your system environment(s) or Security requirements; all code examples from this blog should be thoroughly tested before any attempted use on a production system.

5 Response to "Using pmrep to import an Informatica folder"

  1. Vinoth 2/27/12, 8:43 AM
    I am trying to create a dynamic query in a shell script to export all the objects retrieved from the query for a particular Label.
    That is, If i pass "Release 1" as parameter to the script it should export all the objects that are labelled Release 1.

    'Executequery' of pmrep are used to execute only saved query. Is there a possibility wherein you paramaterize the query on the fly
  2. J. Kinzer 7/22/12, 5:08 PM
    Sorry Vinoth, I am not familiar with this feature.
  3. Saurabh 11/29/12, 10:14 PM
    Thanks for the nice post. I have a question. would the dependencies would also get import along with the workflows and mappings or we need to import them separately ?
  4. J. Kinzer 11/30/12, 10:43 PM

    Dependencies will only be Imported if they are included in the file you are importing. For example, if you use the ObjectExport cmd to export an object and specify the switches -m -s -b –r, then dependencies will be included in the exported xml file and so will be available when the file is imported.

    Please see this post for more information about ObjectExport and Dependencies

  5. Anonymous 1/3/13, 3:34 AM
    Unable to download ' Download the script and control file here' Can u plz mail me.

Post a Comment