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


Substitute attribute values with variables in data load configuration files

You can substitute the values of most attributes in the wc-dataload.xml and wc-dataload-env.xml configuration files. By using variable substitutions, you can change the value of attributes without editing the configuration file. For example, you can substitute the value of the user ID attribute for a variable.

Instead of using fixed attribute values in data load configuration files, you can use variable substitutions. The actual values for the variables are entered in the command line when the data load is run. If you do not enter a value for a variable when running the data load, the utility will prompt you to enter a value.

The following problems should be considered when performing this task:

Variable substitution is case-sensitive.


Procedure

  1. Open the configuration file which contains the attribute value to substitute for editing.

  2. Type a variable name in the space where the attribute value is expected. The format of a variable name is ${name} . For example, the following database configuration properties are in the wc-dataload.xml configuration file:

    Operate System Example

    <_config:Database type="db2" name="mall" user="userId" 
    password="" port="50000" schema="USERID" server="localhost"/>
    

    <_config:Database name="system1" password="" 
    server="system1.abc.com" type="OS400" user="wcuser1" 
    schema="wcuser1"/>
    

    The values can be substituted for the following variables:

    Operate System Example

    <_config:Database type="${dbType}" name="${dbName}" 
    user="${dbUser}" password="" schema="${dbSchema}" 
    server="${dbServerHost}" port="${dbPort}"/>
    

    <_config:Database name="${dbName}" password="" 
    server="${dbServerHost}" type="${dbType}" user="${dbUser}" 
    schema="${dbSchema}"/>
    

    To use the IBM Toolbox JDBC driver, the driverType property is needed. For example:

    <_config:Database name="system1" password="" server="system1.abc.com" type="OS400" driverType="toolbox" user="wcuser1" schema="wcuser1"/>
    

  3. To enter the actual values of the attributes, type -D in front of each variable name on the command line when running the data load utility, as shown in the following example:

    –DdbType=db2 –DdbName=mall -DdbUser=userId -DdbSchema=USERID -DdbServerHost=localhost -DdbPort=50000


+

Search Tips   |   Advanced Search