
PowerCenter: Script to Export Folder Objects
Posted by: Jeff Kinzer
Script using pmrep command to export all or selected objects from Informatica PowerCenter folder by using Query functionality.
Overview
Sometimes you need to export all or some of the contents of a PowerCenter folder for offline storage. This post will show you how to quickly export a PowerCenter folder's contents using the pmrep command's ObjectExport function. Overview of ObjectExportIf you are not familiar with pmrep's ObjectExport function, here's a look at the syntax: pmrep ObjectExport -n objName -o objType -f FolderName -m -s -b -r -u objName.xmlObjectExport exports objects by name, to export multiple objects from a folder you can either supply names one at a time, re-executing the command for each name or you can supply an input file containing a list of object names. You also must supply the object name's folder (-f). The last parameter is the output file name.To simply export all objects from the folder use the following syntax pmrep ObjectExport -f FolderName -u objName.xmlThere are 2 scripts available as part of the download: export_folder_query.batThis script will export a folder's contents as individual XML files and export one XML file containing all the folder's contents. This gives you flexibility when you need to import the objects back into the repository, you can pick and choose from the individual files or import all the folder's contents with the one file.The script uses an input file to supply the list of objects to export. The list is created by executing q PowerCenter Query. To create a query: open PowerCenter Designer (or Repository Manager or any of the tools) and select the menu options: Tools > Queries. When creating a new query, for "Query Conditions" fill in the following: Query Name : Folder_Backup Query Type : Shared Parameter Name : Folder Operator : Is Equal To Value 1 : Folder_Name export_folder.batThis script will export all of the folder's content into a single XML file. This does not use a query. Note: To import the exported objects into another environment please refer to the listingPowerCenter : Script to Import ObjectsYou can download this listing as part of the PowerCenter : Useful Script files bundle.
Features
- Power Center version 9.1 and 9.5