Load data into workspaces using the Data Load utility

The Data Load utility supports loading data into a workspace. By loading data into a workspace we can make and preview changes to managed assets, without affecting what is running on the site.


Task info

By loading data into a workspace, we can gain the following benefits:

If we are loading data into a workspace, take note of the following considerations:


Procedure

  1. Enable workspace loading for the Data Load utility. Specify the attributes for our enabling workspace loading within the business context element of the wc-dataload-env.xml data load environment configuration file:

      <_config:BusinessContext storeIdentifier="AuroraESite" catalogIdentifier="Extended Sites Catalog Asset Store" langId="-1" currency="USD"
      	workspaceIdentifier="W_10001" taskGroupIdentifier="G_10001" taskIdentifier="T_10001">
      </_config:BusinessContext>

    The following workspace attributes can be specified in the business context element:

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

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

      taskGroupName
      The name assigned to the task group by the Workspace Manager. Specify either this attribute or the taskGroupIdentifier attribute. Since multiple task groups can have the same task group name, when you specify this attribute, ensure that there is only one working task group with the specified task group name. Otherwise, the Data Load utility throws an exception.

      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. Since multiple tasks can have the same task name, when you specify this attribute, ensure that there is only one working task with the specified task name. Otherwise, the Data Load utility throws an exception.

  2. Run the Data Load utility to load data into the workspace.

    Note: When you load data into a workspace, do not use the unique ID in your input file. If you use the unique ID and a foreign key or unique index violation occurs, the data load into the workspace does not detect these errors. An exception occurs only when the content data is approved.

      Example 1

      1. Specify the catalog group unique ID (the generated primary key) in the input file when loading a catalog entry with the parent catalog group.

      2. Load the input file into the base schema. A foreign key violation is reported since the unique catalog group ID does not exist in the database.

      3. Load the same input file into a workspace. It is successfully loaded since there are no foreign key constraints in the workspace write schema.

      4. A foreign constraint exception is received when the content data is approved.

      Example 2

      1. Specify both the catalog group unique ID (the generated primary key) and the catalog group identifier (part of the unique index) in the input file.

      2. The catalog group identifier is already in the database. Also, the catalog group unique ID specified in the input file is different from the ID stored in the database for the same catalog group identifier.

      3. Load the input file into the base schema. A unique index violation exception is reported.

      4. Load the same input file into a workspace. It is successfully loaded since the unique index in the workspace is dropped.

      5. A unique index violation exception is received when the content data is approved.


Related concepts
Overview of the Data Load utility