Importing Objects with pmrep and Control Files

© 2008 Informatica Corporation

and label them.0" encoding="UTF-8"?> <!DOCTYPE IMPORTPARAMS SYSTEM "impcntl. label them. This section describes some examples of when you can use ObjectImport. The lines of code that are key to performing the described tasks are highlighted. and resolve the conflict that arises between the existing session configuration and the session configuration in the new folder. <?xml version="1.dtd"> <IMPORTPARAMS CHECKIN_AFTER_IMPORT="YES" CHECKIN_COMMENTS="VERSION1" APPLY_LABEL_NAME="LABEL_IMPORT_NEW"> <FOLDERMAP SOURCEFOLDERNAME="SRC_F1" SOURCEREPOSITORYNAME="SRC_REPO1" TARGETFOLDERNAME="TGT_F1" TARGETREPOSITORYNAME="TGT_REPO1"/> <RESOLVECONFLICT> <TYPEOBJECT OBJECTTYPENAME="SessionConfig" RESOLUTION="REUSE"/> </RESOLVECONFLICT> </IMPORTPARAMS> You can retain the values of Sequence Generator and Normalizer transformations when you import objects and replace all objects in the target folder.dtd file.0" encoding="UTF-8"?> <!DOCTYPE IMPORTPARAMS SYSTEM "impcntl. The code following each description is an example of the code you include in the control file to perform the task.dtd"> <IMPORTPARAMS CHECKIN_AFTER_IMPORT="YES" CHECKIN_COMMENTS="VERSION1" APPLY_LABEL_NAME="LABEL_IMPORT_NEW" RETAIN_GENERATED_VALUE="YES"> <FOLDERMAP SOURCEFOLDERNAME="SRC_F1" SOURCEREPOSITORYNAME="SRC_REPO1" TARGETFOLDERNAME="TGT_F1" TARGETREPOSITORYNAME="TGT_REPO1"/> <RESOLVECONFLICT> 2 . Suppose you want to export the objects from folder SRC_F1 and import them into new folder TGT_F1. check them in. The parameters you specify in the control file code determine the actions that take place when you execute pmrep ObjectImport. Using ObjectImport with a Control File The ObjectImport command requires a control file to specify the objects you want to import. You include the RESOLVECONFLICT element in the control file to resolve the conflict between the existing session configuration and the session configuration in the new folder.0" encoding="UTF-8"?> <!DOCTYPE IMPORTPARAMS SYSTEM "impcntl. The Repository Server creates a session configuration in the new folder by default.dtd"> <IMPORTPARAMS CHECKIN_AFTER_IMPORT="YES" CHECKIN_COMMENTS="NEWOBJECTS" APPLY_LABEL_NAME="LABEL_IMPORT_NEW"> <FOLDERMAP SOURCEFOLDERNAME="SRC_F1" SOURCEREPOSITORYNAME="SRC_REPO1" TARGETFOLDERNAME="TGT_F1" TARGETREPOSITORYNAME="TGT_REPO1"/> </IMPORTPARAMS> You can import objects to a new folder. You can import multiple Designer objects into a new folder. The control file is defined by the impcntl.Overview You can use the pmrep ObjectImport with a control file to import objects into folders. <?xml version="1. <xml version="1. check them in.

dtd"> <IMPORTPARAMS CHECKIN_AFTER_IMPORT="NO"> <FOLDERMAP SOURCEFOLDERNAME="SRC_SHARED_F1" SOURCEREPOSITORYNAME="SRC__REPO1" TARGETFOLDERNAME="TGT_SHARED_F1" TARGETREPOSITORYNAME="TGT_REPO1"/> <FOLDERMAP SOURCEFOLDERNAME="SRC_NONSHARED_F1" SOURCEREPOSITORYNAME="SRC_REPO1" TARGETFOLDERNAME="TGT_NONSHARED_F1" TARGETREPOSITORYNAME="TGT_REPO1"/> </IMPORTPARAMS> You can import objects from shared repositories.0" encoding="UTF-8"?> <!DOCTYPE IMPORTPARAMS SYSTEM "impcntl.dtd"> <IMPORTPARAMS CHECKIN_AFTER_IMPORT="YES" CHECKIN_COMMENTS="mulfolders" APPLY_LABEL_NAME="L1"> <FOLDERMAP SOURCEFOLDERNAME="F1" SOURCEREPOSITORYNAME="R1" TARGETFOLDERNAME="T1" TARGETREPOSITORYNAME="Symphony_SYB_1"/> <FOLDERMAP SOURCEFOLDERNAME="F2" SOURCEREPOSITORYNAME="R2" TARGETFOLDERNAME="T2" TARGETREPOSITORYNAME="Symphony_SYB_1"/> <FOLDERMAP SOURCEFOLDERNAME="F3" SOURCEREPOSITORYNAME="R3" TARGETFOLDERNAME="T3" TARGETREPOSITORYNAME="Symphony_SYB_1"/> <RESOLVECONFLICT> <TYPEOBJECT OBJECTTYPENAME = "SESSIONCONFIG" RESOLUTION="REUSE"/> 3 . <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE IMPORTPARAMS SYSTEM "impcntl. and contains local shortcut objects. You want to import the global shortcut objects to a repository that is registered to the same global repository and maintain shortcuts to the original objects in the global repository. You want to import the objects to two new folders. <?xml version="1. <?xml version="1. Suppose you have objects in a local repository that contains shortcuts to objects in a global repository.0" encoding="UTF-8"?> <!DOCTYPE IMPORTPARAMS SYSTEM "impcntl. The SRC_NONSHARED_F1 folder is not shared.<TYPEOBJECT OBJECTTYPENAME="ALL" RESOLUTION="REPLACE"/> </RESOLVECONFLICT> </IMPORTPARAMS> You can import shortcut objects from shared folders if the shortcut objects are located in a single repository. Suppose you have two folders: SRC_SHARED_F1 and SRC_NONSHARED_F1. and you want the shortcuts to point to objects in the new shared folder.dtd"> <IMPORTPARAMS CHECKIN_AFTER_IMPORT="YES" CHECKIN_COMMENTS="global objects" APPLY_LABEL_NAME="LABEL_IMPORT_GLOBAL_SHORTCUT"> <FOLDERMAP SOURCEFOLDERNAME="SRC_SHARED_F1" SOURCEREPOSITORYNAME="SRC_GDR_REPO1" TARGETFOLDERNAME="SRC_SHARED_F1" TARGETREPOSITORYNAME="SRC_GDR_REPO1"/> <FOLDERMAP SOURCEFOLDERNAME="SRC_NONSHARED_F1" SOURCEREPOSITORYNAME="SRC_LDR_REPO1" TARGETFOLDERNAME="TGT_NONSHARED_F1" TARGETREPOSITORYNAME="SRC_LDR_REPO2"/> </IMPORTPARAMS> You can create a folder map to import objects into multiple folders that were exported from multiple folders.

replace the mappings.0" encoding="UTF-8"?> <!DOCTYPE IMPORTPARAMS SYSTEM "impcntl.dtd"> <IMPORTPARAMS CHECKIN_AFTER_IMPORT="YES" CHECKIN_COMMENTS="PMREP_IMPORT_TYPEFILTER" APPLY_LABEL_NAME="LABEL_SESSION_TYPEFILTER"> <FOLDERMAP SOURCEFOLDERNAME="PMREP_CHECKED_OUT" SOURCEREPOSITORYNAME="REPO_EX_1" TARGETFOLDERNAME="PMREP_CHECKED_OUT_IMPORT_TYPEFILTER_SESSION" TARGETREPOSITORYNAME="REPO_EX_1"/> <TYPEFILTER TYPENAME="SESSION"/> <RESOLVECONFLICT> <TYPEOBJECT OBJECTTYPENAME = "MAPPING" RESOLUTION="REPLACE"/> <TYPEOBJECT OBJECTTYPENAME = "SOURCE DEFINITION" RESOLUTION="REUSE"/> <TYPEOBJECT OBJECTTYPENAME = "TARGET DEFINITION" RESOLUTION="REUSE"/> <TYPEOBJECT OBJECTTYPENAME = "SESSIONCONFIG" RESOLUTION="REUSE"/> </RESOLVECONFLICT> </IMPORTPARAMS> You can replace invalid mappings and their child objects that are returned by a query. and reuse the existing sources and targets in the target folder. to a folder.0" encoding="UTF-8"?> <!DOCTYPE IMPORTPARAMS SYSTEM "impcntl.</RESOLVECONFLICT> </IMPORTPARAMS> You can choose the objects you want to import.dtd"> <IMPORTPARAMS CHECKIN_AFTER_IMPORT="YES" CHECKIN_COMMENTS="PMREP_IMPORT_TYPEFILTER" APPLY_LABEL_NAME="LABEL_MAPPING_TYPEFILTER"> <FOLDERMAP SOURCEFOLDERNAME="PMREP_CHECKED_OUT" SOURCEREPOSITORYNAME="REPO_EX_1" TARGETFOLDERNAME="PMREP_CHKOUT_IMPORT_MAPPING" TARGETREPOSITORYNAME="REPO_EX_1"/> <TYPEFILTER TYPENAME="MAPPING"/> </IMPORTPARAMS> You can import sessions. <?xml version="1. <?xml version="1. <?xml version="1. and their respective sources and targets. You want to import only mappings.0" encoding="UTF-8"?> <!DOCTYPE IMPORTPARAMS SYSTEM "impcntl.dtd"> <IMPORTPARAMS CHECKIN_AFTER_IMPORT="YES" CHECKIN_COMMENTS="PMREP_IMPORT_QUERY_PARENT_REPLACE_CHILD_REUSE" APPLY_LABEL_NAME="LABEL_QUERY_PARENT_RENAME_CHILD_REUSE"> <FOLDERMAP SOURCEFOLDERNAME="PMREP_CHECKED_OUT" SOURCEREPOSITORYNAME="REPO_EX_1" TARGETFOLDERNAME="PMREP_CHECKED_OUT" TARGETREPOSITORYNAME="REPO_EX_1"/> <RESOLVECONFLICT> 4 . Suppose you imported multiple object types from an XML file.

0" encoding="UTF-8"?> <!DOCTYPE IMPORTPARAMS SYSTEM "impcntl. <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE IMPORTPARAMS SYSTEM "impcntl.<QUERYOBJECT QUERYNAME="QUERY_PARENT_RENAME" RESOLUTION="REPLACE"/> </RESOLVECONFLICT> </IMPORTPARAMS> You can rename specific objects when object conflicts occur. <?xml version="1.dtd"> <IMPORTPARAMS CHECKIN_AFTER_IMPORT="YES" CHECKIN_COMMENTS="Version2 of objects" APPLY_LABEL_NAME="LABEL71_REPLACE_FOLDER" COPY_SAP_PROGRAM="YES"> <FOLDERMAP SOURCEFOLDERNAME="PMREP_EBIZ" SOURCEREPOSITORYNAME="REPO_EX_1" TARGETFOLDERNAME="PMREP_IMP_EBIZ" TARGETREPOSITORYNAME="REPO_EX_1"/> </IMPORTPARAMS> You can apply a default connection attribute to a session if a connection is not present in the target repository.dtd"> <IMPORTPARAMS CHECKIN_AFTER_IMPORT="NO" APPLY_DEFAULT_CONNECTION="YES"> <FOLDERMAP SOURCEFOLDERNAME="PMREP_EBIZ" SOURCEREPOSITORYNAME="REPO_EX_1" TARGETFOLDERNAME="PMREP_IMP_EBIZ" TARGETREPOSITORYNAME="REPO_EX_1"/> 5 .dtd"> <IMPORTPARAMS CHECKIN_AFTER_IMPORT="YES" CHECKIN_COMMENTS="PMREP_IMPORT_SPECIFICOBJECT_RENAME" APPLY_LABEL_NAME="LABEL_IMPORT_SPECIFIC_OBJECT_RENAME"> <FOLDERMAP SOURCEFOLDERNAME="PMREP_CHECKED_OUT" SOURCEREPOSITORYNAME="REPO_EX_1" TARGETFOLDERNAME="PMREP_CHECKED_OUT_IMPORT" TARGETREPOSITORYNAME="REPO_EX_1"/> <RESOLVECONFLICT> <SPECIFICOBJECT NAME="ADDRESS" DBDNAME="sol805" OBJECTTYPENAME="Source Definition" FOLDERNAME="PMREP_CHECKED_OUT" REPOSITORYNAME="REPO_EX_1" RESOLUTION="RENAME"/> <SPECIFICOBJECT NAME="ADDRESS1" DBDNAME="sol805" OBJECTTYPENAME="Target Definition" FOLDERNAME="PMREP_CHECKED_OUT" REPOSITORYNAME="REPO_EX_1" RESOLUTION="RENAME"/> <SPECIFICOBJECT NAME="R_LKP" OBJECTTYPENAME="Lookup Procedure" FOLDERNAME="PMREP_CHECKED_OUT" REPOSITORYNAME="REPO_EX_1" RESOLUTION="RENAME"/> <SPECIFICOBJECT NAME="MAP_MLET" OBJECTTYPENAME="Mapping" FOLDERNAME="PMREP_CHECKED_OUT" REPOSITORYNAME="REPO_EX_1" RESOLUTION="RENAME"/> <SPECIFICOBJECT NAME="R_S3" OBJECTTYPENAME="Session" FOLDERNAME="PMREP_CHECKED_OUT" REPOSITORYNAME="REPO_EX_1" RESOLUTION="RENAME"/> <SPECIFICOBJECT NAME="WF_RS1" OBJECTTYPENAME="Workflow" FOLDERNAME="PMREP_CHECKED_OUT" REPOSITORYNAME="REPO_EX_1" RESOLUTION="RENAME"/> </RESOLVECONFLICT> </IMPORTPARAMS> You can copy SAP mappings and SAP program information.0" encoding="UTF-8"?> <!DOCTYPE IMPORTPARAMS SYSTEM "impcntl. <?xml version="1.

<RESOLVECONFLICT> <SPECIFICOBJECT NAME="R_S3" OBJECTTYPENAME="Session" OLDERNAME="PMREP_CHECKED_OUT" REPOSITORYNAME="REPO_EX_1" RESOLUTION="REPLACE"/> <RESOLVECONFLICT> </IMPORTPARAMS> You can resolve object conflicts for labeled objects in the target repository. You want to replace these objects and label them REPLACE_LABEL_MAPPING_MAPPLETS_SOURCES_TARGETS and reuse all transformations.0" encoding="UTF-8"?> <!DOCTYPE IMPORTPARAMS SYSTEM "impcntl. and targets labeled LABEL_MAPPING_MAPPLETS_SOURCES_TARGETS. Suppose you have mappings. sources.dtd"> <IMPORTPARAMS CHECKIN_AFTER_IMPORT="YES" CHECKIN_COMMENTS="PMREP_IMPORT_LABEL_REPLACE" APPLY_LABEL_NAME="REPLACE_ LABEL_MAPPING_MAPPLETS_SOURCES_TARGETS" > <FOLDERMAP SOURCEFOLDERNAME="PMREP_CHECKED_OUT" SOURCEREPOSITORYNAME="pmrep_65" TARGETFOLDERNAME="PMREP_CHECKED_OUT_IMPORT" TARGETREPOSITORYNAME="pmrep_65"/> <RESOLVECONFLICT> <LABELOBJECT LABELNAME="LABEL_MAPPING_MAPPLETS_SOURCES_TARGETS" RESOLUTION="REPLACE"/> <TYPEOBJECT OBJECTTYPENAME="Lookup Procedure" RESOLUTION="REUSE"/> <TYPEOBJECT OBJECTTYPENAME="Stored Procedure" RESOLUTION="REUSE"/> <TYPEOBJECT OBJECTTYPENAME="Expression" RESOLUTION="REUSE"/> <TYPEOBJECT OBJECTTYPENAME="Filter" RESOLUTION="REUSE"/> <TYPEOBJECT OBJECTTYPENAME="Aggregator" RESOLUTION="REUSE"/> <TYPEOBJECT OBJECTTYPENAME="Rank" RESOLUTION="REUSE"/> <TYPEOBJECT OBJECTTYPENAME="Normalizer" RESOLUTION="REUSE"/> <TYPEOBJECT OBJECTTYPENAME="Router" RESOLUTION="REUSE"/> <TYPEOBJECT OBJECTTYPENAME="Sequence" RESOLUTION="REUSE"/> <TYPEOBJECT OBJECTTYPENAME="Sorter" RESOLUTION="REUSE"/> <TYPEOBJECT OBJECTTYPENAME="update strategy" RESOLUTION="REUSE"/> <TYPEOBJECT OBJECTTYPENAME="Custom Transformation" RESOLUTION="REUSE"/> <TYPEOBJECT OBJECTTYPENAME="Transaction control" RESOLUTION="REUSE"/> <TYPEOBJECT OBJECTTYPENAME="External Procedure" RESOLUTION="REUSE"/> <TYPEOBJECT OBJECTTYPENAME="Joiner" RESOLUTION="REUSE"/> <TYPEOBJECT OBJECTTYPENAME="SessionConfig" RESOLUTION="REUSE"/> </RESOLVECONFLICT> </IMPORTPARAMS> 6 . <?xml version="1.

His current interests are Unstructured Data. Data Transformation. 7 . and B2B Data Exchange.Author David Meister Technical Support Engineer David Meister is a four-year veteran of Informatica Global Customer Support.

Sign up to vote on this title
UsefulNot useful