Import multiple data sources

Multiple data sources can be imported simultaneously by means of the -datasourcelist <datasource> argument (see chapter runprocessimport argument). To import multiple data sources a configuration file is available in which you can specify a list of data sources. During a process import, the data of the data sources specified in the configuration file are imported consecutively, just as if the process import was called consecutively multiple times using the ‑datasource <datasource> argument. The sequence of the data source import is specified in the configuration file.

The reading/importing of data sources of the GRAPH type is not supported for process imports using the -datasourcelist argument.

The configuration file must match the datasourcelist.dtd DTD, which looks as follows.

<!ELEMENT datasourcelist (datasource*)>

<!ELEMENT datasource (#PCDATA)>

<!ATTLIST datasource

name ID #REQUIRED

type (EVENT | GRAPH | MYSAP | JDBC | CSV | NIRVANA ) #REQUIRED

>

You need to specify an ID for each data source, i.e., the name of the data source also used in CTK, the data source type, and the path to the data source file.

An XML file can look as follows.

<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE datasourcelist SYSTEM "datasourcelist.dtd">

<datasourcelist>

<datasource name="CLEARING" type="EVENT">M:/SoftwareAG/ppmmashzone/server/bin/work/data_ppm/custom/umg_en/xml/CLEARING/CLEARING.xml</datasource>

<datasource name="ACCOUNTING" type="GRAPH"> M:/SoftwareAG/ppmmashzone/server/bin/work/data_ppm/custom/umg_en/xml/ACCOUNTING/ACCOUNTING.xml</datasource>

<datasource name="BILLING" type="MYSAP"> M:/SoftwareAG/ppmmashzone/server/bin/work/data_ppm/custom/umg_en/xml/BILLING/BILLING.xml</datasource>

<datasource name="SHIPMENT" type="JDBC"> M:/SoftwareAG/ppmmashzone/server/bin/work/data_ppm/custom/umg_en/xml/SHIPMENT/SHIPMENT.xml</datasource>

<datasource name="MATERIAL_DOCUMENT" type="CSV">M:/SoftwareAG/ppmmashzone/server/bin/work/data_ppm/custom/umg_en/xml/MATERIAL_DOCUMENT/MATERIAL_DOCUMENT.xml</datasource>

<datasource name="PURCHASE_PROCESS" type="NIRVANA"> M:/SoftwareAG/ppmmashzone/server/bin/work/data_ppm/custom/umg_en/xml/PURCHASE_PROCESS/PURCHASE_PROCESS.xml</datasource>

</datasourcelist>

Error behavior

If the import is called via a valid configuration file that does not contain any data sources the import ends without outputting an error message.

If the import is called with a configuration file containing multiple data sources and if an error occurs during the import of a data source the import will be completely canceled.

If an error occurs during the import of at least one data source from a configuration file, which has so far lead to an exit error status (i.e., "-1") during the import of individual data sources, the import using that configuration file will also return this exit error state.