Modifying the Import Header to Use DocumentIDs

Follow these steps to modify the import header to use DocumentIDs.

Context

Types like User that have a unique identifier (such as the code attribute) are rather simple to handle as referencing the identifier will do for migration purposes (both for export and for import). Things are different with types that do not have a unique identifier on top of the PK. To export items without an identifier on top of the PK, you will need to resolve the item's PK and use the PK as a reference during import. For such types, you have to leave the references to the PK in the export headers. For more in-depth details on Document IDs, please refer to Document ID.

Procedure

  1. Once the Wizard has completed, click the Download button.
  2. Save the file on your system's local hard disk.
  3. Unpack the ZIP file.
  4. Open the impexscript.impex file.
  5. Replace the reference to the PK (such as addresses(pk)) with DocumentIDs (name with a prefixed &, such as &pk, for example), such as:
    insert_update Address; &pk; country(isocode)[unique=true]; ... ;owner(&pk)[unique=true] "#% impex.includeExternalDataMedia( ""Address.csv"" , ""UTF-8"", ';', 1, -1 );" #----------------------------------------------------------- #----------------------------------------------------------- insert_update User; &pk; uid[unique=true]; addresses(&pk); sessionLanguage(isocode); ... "#% impex.includeExternalDataMedia( ""User.csv"" , ""UTF-8"", ';', 1, -1 );" #-----------------------------------------------------------
  6. Create a new ZIP file containing the edited impexscript.impex file and the CSV files.
  7. Make sure the new ZIP file is stored on a volume you can reach from the system to which to import (CD, DVD, network share, USB storage device).