Command Reference > pmrep Command Reference > ObjectExport
  

ObjectExport

Exports objects to an XML file defined by the powrmart.dtd file. You export an object by name. If you enter an object, you must enter the name of the folder that contains it. If you do not enter a version number, you export the latest version of the object.
Use a persistent input file to specify different objects to export at one time. You can create this file by using the ExecuteQuery, Validate, or ListObjectDependencies pmrep commands. If you use the persistent input file, do not use the other parameters to specify objects.
If you export a mapping, by default PowerCenter exports the mapping and its instances. If you want to include dependent objects, you must add the appropriate pmrep options. You can optionally include reusable and non-reusable dependent objects, objects referenced by shortcuts, and related objects in a primary key-foreign key relationship.
To export mapping dependencies, you must use the -b and -r options.
The ObjectExport command uses the following syntax:
objectexport

{{-n <object_name>

 -o <object_type>

 [-t <object_subtype>]

 [-v <version_number>]

 [-f <folder_name>]} |

 -i <persistent_input_file>}

[-m (export pk-fk dependency)]

[-s (export objects referred by shortcut)]

[-b (export non-reusable dependents)]

[-r (export reusable dependents)]

-u <xml_output_file_name>

[-l <log_file_name>]

[-e dbd_separator]
The following table describes pmrep ObjectExport options and arguments:
Option
Argument
Description
-n
object_name
Required if you do not use the -i option. Name of a specific object to export. If you do not enter this option, pmrep exports all the latest or checked out objects in the folder. Use the -n option or the -i option, but not both.
-o
object_type
Object type of the object name. You can specify source, target, transformation, mapping, mapplet, session, worklet, workflow, scheduler, session config, or task. If you use this option, you cannot use the -i option.
-t
object_subtype
Type of transformation or task. This argument is ignored for other object types. For more information about valid subtypes, see Listing Object Types.
-v
version_number
Optional. Exports the version of the object that you enter.
-f
folder_name
Name of the folder containing the object to export. If you do not enter an object name, pmrep exports all the objects in this folder. If you use this option, you cannot use the -i option.
-i
persistent_input_file
Required if you do not use the -n option. Text file list of objects generated from ExecuteQuery, Validate, or ListObjectDependencies. It contains object records with encoded IDs. If you use this parameter, you cannot use the -n, -o, or -f options.
-m
-
Required to export dependent objects. Exports primary key table definitions when you export sources or targets with foreign keys.
-s
-
Required to export dependent objects. Exports the original object referenced by the shortcut.
-b
-
Required to export dependent objects. Exports non-reusable objects used by the object.
-r
-
Required to export dependent objects. Exports reusable objects used by the object.
-u
xml_output_file_name
Required. Name of the XML file to contain the object information.
-l
log_file_name
Optional. Log file that records each export step. If you omit this option, status messages output to the window.
-e
dbd_separator
Optional. If an ODBC source has a period (.) in the name, define a different separator character when you define the source object. For example, instead of database_name.source_name, define the source object as database_name\source_name, and define the dbd_separator as backslash (\).

Examples

The following example exports a mapping named “map,” which is located in folder1, to a file named map.xml:
objectexport -n map -o mapping -f folder1 -u map.xml
The following example exports the objects identified in a persistent input file named persistent_input.xml to a file named map.xml:
objectexport -i persistent_input.txt -u map.xml