Use the loading utilities

This diagram illustrates the various steps involved in loading and extracting data. This diagram involves:

  1. Transforming data

  2. Loading data

  3. Extracting data

 

 

Transforming data

Use the data transformation process, you can transform a CSV file to a WebSphere Commerce XML data file. This involves:

  1. The text transformation process transforms the CSV data file to a generic XML file using the txttransfrom utility. A parameter file is used as an input. The parameter file contains the path and file name of the input CSV file, the schema file, the output file, and the encoding used. The transformation rule is defined in the XML Schema file. The output of the text transformation process will be a generic XML file.

  2. The XML transformation process transforms the generic XML to a WebSphere Commerce XML data file using the xmltransform utility. This utility uses the XSL rule, the output file name, and the generic XML file generated in the previous step as input. The XSL rule is applied on the generic XML for transformation. The output will be the WebSphere Commerce XML file that is required for the loading process.

 

 

Loading data

The basic loading process comprises, resolving keys and loading data. This involves:

  1. The loading utilities require the WebSphere Commerce DTD file. If the DTD file is available, then go to the next step. Otherwise, use the dtdgen utility to generate a DTD file. The dtdgen utility uses a text file that contains the table names for which the description is required and the output DTD file name. The result will be a DTD file containing the description of the database tables.

  2. The WebSphere Commerce XML data file (generated when transforming data) needs to be resolved for unique keys. This requires the idresgen utility, which uses the DTD file and the generated WebSphere Commerce XML as the input, to produce the output XML data file with resolved identifiers.

  3. The data from the resolved XML data file generated in the previous step is loaded into the WebSphere Commerce database using the massload utility. This utility uses the resolved XML file as the input and loads the data into the WebSphere Commerce database.

 

 

Extracting data

The extraction process is used to extract data from the WebSphere Commerce database. This involves:

  1. An extraction filter that contains the SQL to extract data must to be hard coded.

  2. The massextract utility is used to the extract the data from the WebSphere Commerce database. This utility uses the output file name and the extraction filter defined in the previous step as inputs. The output will be a generic WebSphere Commerce XML data file.