About exporting/importing init data from/to tables
These actions can only be performed from a Command Line Interface (CLI). These commands are not intended to be used for data migrations.
Exporting init data
The exportinitdata
command switch exports the init data of a specified
table to an XML file. The resulting XML file is formatted similarly to other App Metadata
Transport file outputs.
This option can be used for only a single table at one time. This option requires a
-tableName
parameter to be specified.
The XML file derives its name from the -targetDir
and
-tableName
parameters:
<targetDir><tableName>.xml
Importing init data
The importinitdata
command switch imports the init data of the specified
table from an XML file to which it has been exported.
This option is available only from a CLI and can be used for only a single table at one time. This option requires a tableName parameter to be specified.
Doing a mass import of init data
The massimportinitdata
command switch imports the init data from all of the
XML files in a specified directory.
This option requires a -tableName
parameter to be specified.
This command exports the init data from a table named "EventDocument" in a configuration named "MyConfig" to a folder named "AMT_Exports":
AppmetadataTransport -action exportinitdata -tableName EventDocument
-targetDir C:\AMTExports -sourceConfig MyConfig
This command results in this path and file: C:\AMTExports\AMTEportsEventDocument.xml
This command imports the init data from an XML file named EventsInitData.xml in the C:\AMTExports directory into a configuration named MyConfig:
AppmetadataTransport -action importinitdata -sourceXml “C:\AMTExport\EventsInitData.xml”
-targetConfig MyConfig
This command imports the init data from all XML files in the C:\AMTExports directory into a configuration named MyConfig:
AppmetadataTransport -action massimportinitdata -sourceXml “C:\AMTExportFiles”
-targetConfig MyConfig