Configuring the Data Extract utilityorder configuration file
Create a data extract order configuration file for the Data Extract utility to use to identify the business
objects to extract and the sequence to extract the data. This file must also identify the other
configuration files for configuring the utility and identify the CSV or XML output files that the
utility is to generate.
Procedure
-
Go to the following directory, which contains the sample configuration files for extracting
data:
- WC_installdir/samples/DataExtract
- WC_installdir\samples\DataExtract
- WCDE_installdir\samples\DataExtract
- Create a backup of the wc-extract-business-object.xml configuration file or files in the directory or subdirectories for the object or objects that you want to extract, where business-object is the name of the business object that you are extracting.
- Open the data extract order configuration file (wc-dataextract-object.xml) for the object that you want to extract for editing.
-
Configure the
<_config:DataLoadEnvironment>
element to set the value of theconfigFile
attribute to identify the environment configuration file. If the file is not in the same directory as the main configuration file, include the relative path to environment configuration file. -
Configure the
<_config:LoadOrder>
element to set the value for any attributes that you want to apply to the extraction process for all load items.For example, you can include one of the following configurable name-value pair properties to configure the structure of any generated CSV output files.firstTwoLinesAreHeader
- Configures the generated CSV output files to include two lines of header information. The first
line includes the keyword for the type of business object that is included in the file. The second
line includes the column headings. You can include the following values for this property:
true
- The CSV files include two lines of header information.
false
- The CSV files do not include two lines of header information. This value is the default value.
firstLineIsHeader
- Configures the generated CSV output files to include the column heading as a line of header
information. You can include the following values for this property:
true
- The CSV files include the column headings as a header line.
false
- The CSV files do not include a line of header information. This value is the default value.
false
, the generated CSV output file does not include any header information. The files include only the data records. If you include both properties set totrue
, the generated CSV output files include two lines of header information.Note: Since the Data Extract utility uses the existing Data Load utility framework, you can include thecommitCount
andbatchSize
attributes. Since the Data Extract utility does not insert any data into the database, any setting for these attributes does not affect the extract process. If you do include these attributes, set the value ofcommitCount
to be0
and the value ofbatchSize
to be0
. -
Configure the
outputDirectory
variable for use in specifying the directory where the utility is to generate the configured output files.This configurable variable is used within thelocation
attribute for the<_config:DataOutputLocation>
element of each load item to help quickly define the output file location. By default this directory is named output and is in the same directory as the sample data extract order configuration file. If you want the name of the directory or the location, edit the following variable configuration in your sample file:
If you want to change the location of the directory, include the relative path from the order configuration file directory or the absolute path of the directory where you want the output files and any output directories to generate.<_config:Variable name="outputDirectory" value"output" />
-
Configure each
<_config:LoadItem>
element.Ensure that the value for thename
attribute identifies the object that you are extracting data about. The value for each of thebusinessObjectConfigFile
attributes must identify the correct business object configuration file that the utility needs to use to transform the object data. If the file is not in the same directory as the main configuration file, include the relative path to business object configuration file. -
In the
<_config:DataOutputLocation>
element for each load item, change the value of thelocation
attribute to identify the file name for the output file to be generated.If you want this file to generate in a different subdirectory in the configured output directory structure, include the relative path to the destination where you want the file to generate. This relative path is from the configured output directory.If you want the utility to generate XML output files instead of the default CSV files, specify the output file name with the .xml file name extension. You must also edit the business object configuration file so the utility uses the XML data writer.
- Save and close the configuration file.
What to do next
Run the Data Extract utility command. For more information about the parameters that you can configure when you run the utility from a command-line utility, see Data Extract utility.
For more information about extracting specific types of objects, see: