Administer > Transforming, loading, and extracting data > Overview of the data load utility > Run the data load utility


Configure the data load environment settings

  1. Create a file called wc-dataload-env.xml. A sample is provided in...

      WC_INSTALL/samples/DataLoad/Catalog

  2. Optional: Set <_config:BusinessContext > to match the store settings...

    <_config:BusinessContext storeIdentifier="Madisons" 
                             catalogIdentifier="Madisons" 
                             languageId="-1" 
                             currency="USD">
    </_config:BusinessContext>
    

  3. Optional: Set <_config:BusinessContext> to enable workspace loading...

    <_config:BusinessContext storeIdentifier="Madisons" 
                             catalogIdentifier="Madisons" 
                             langId="-1" currency="USD"          
                             workspaceIdentifier="W_10001" 
                             taskGroupIdentifier="G_10001" 
                             taskIdentifier="T_10001">     
    
    </_config:BusinessContext>
    

    The workspace attributes that can be specified in the business context are:

    workspaceIdentifier

    The workspace code is the system generated identifier for the workspace, not the name assigned to the workspace by the Workspace Manager.

    taskGroupIdentifier

    The task group code is the system generated identifier for the task groups, not the name assigned to the tasks group by the Workspace Manager. Specify either this attribute or the taskGroupName attribute.

    taskGroupName

    The name assigned to the tasks group by the Workspace Manager. Specify either this attribute or the taskGroupIdentifier attribute.

    taskIdentifier

    The task code is the system generated identifier for the task, not the name assigned to the task by the Workspace Manager. Specify either this attribute or the taskName attribute.

    taskName

    The name assigned to the task by the Workspace Manager. Specify either this attribute or the taskIdentifier attribute.

    If you specify the workspace attributes, be aware that the data load utility respects the locking policy set in the workspace.

  4. Set <_config:Database> to match the database environment.

    
     <_config:Database type="derby" 
                       name="..\..\db\mall" /> 
    
     <_config:Database type="db2" 
                       name="database name" 
                       user="user" 
                       password="encrypted password" 
                       server="server" 
                       port="50000" 
                       schema="schema name" /> 
    
     <_config:Database type="Oracle" 
                       name="database name" 
                       user="user" 
                       password="encrypted password" 
                       port="1521" 
                       schema="schema name" 
                       server="server" 
                       driverType="thin" />
    

    Where:

    type
    • derby
    • db2
    • oracle
    name name of the database
    user The database user ID.
    password The database password needed to connect to the database. For security purposes, the password is always encrypted. If the password field is empty, we will be prompted to enter the password on the command line when you run the data load utility.
    server The name of the server the database is on. The server name can be the IP address or the fully qualified DNS name of the server the database is on.

    port The port to connect to the database.

    driverType The database driver type. It is optional. The default value for the driverType is thin. Another possible option for the driverType is oci8 which is the oracle thick driver.

    schema The name of the database schema.

  5. Encrypt the password of the database user:

    WC_INSTALL/bin
    ./wcs_encrypt.sh db_password

    Use the encrypted password next to ASCII encrypted string as the value for the password attribute inside the <_config:Database> element.

    For security, the password should always be encrypted when specified inside of the configuration file.

  6. Find the <_config:IDResolver> element.

  7. Optional: Modify the cache size inside the tag.

    Option Description
    cacheSize Set the cache memory allocation for the ID resolver.

    The ID resolver performs faster when unique ID data in retrieved from cache memory instead of from the database.

    If you do not specify a <_config:IDResolver> element, the default cache size value is 0 bytes.

  8. Find the <_config:DataWriter> element.

  9. Optional: Add the class name of the data writer inside the tag.

    Option Description
    native load data writer Write WCS physical objects to database loadable files.

    The files are specific to the selected database management system, and must be written to the database using the native database loading utilities in a separate operation. Because the data is in a native loadable file format, the load processes is faster than JDBC batch jobs. The native load data writer only supports insert mode. The native load data writer is not supported on the staging database; because it bypasses the staging triggers.

    Use the native load data writer for faster performance, such as when loading large amounts of data during initial loads.

    <_config:DataWriter className="com.ibm.commerce.foundation.dataload.datawriter.NativeDBDataWriter" />
    

    JDBC data writer Write physical objects directly to a database in a JDBC batch job.

    The JDBC data writer has the following advantages over the native load data writer:

    • The JDBC data writer supports insert, delete, and replace modes. The native load data writer only supports insert mode.

    • The native load data writer bypasses database triggers, requiring data to be loaded separately to both production and staging servers. The JDBC data writer does not bypass database triggers.

    • The JDBC data writer provides more error reporting than the native load data writer.

    Use the JDBC data writer for greater flexibility, such as when replacing and deleting data during the same load.

    <_config:DataWriter className="com.ibm.commerce.foundation.dataload.datawriter.JDBCDataWriter" /> 

    If you do not specify a <_config:DataWriter> element, the JDBC data writer is used by default.

  10. Save and close the configuration file.


Previous topic: Configure the data load order


Next topic: Run the data load utility


Related tasks

Load data into workspaces using the Data load utility

Configure the data load order

Substitute attribute values with variables in data load configuration files


Related information

Data load environment configuration file


+

Search Tips   |   Advanced Search