Add a value accessor set for the source file

Abstract

How to create value accessors in Sitecore Data Exchange Framework to read values from the source file.

To read values from the source file, you must create a value accessor for each value. Each value accessor represents a specific value from a row in the source file. You group related value accessors into value accessor sets, which can contain one or more value accessors.

Create a folder for the value accessor set

Under a tenant, value accessor sets are organized by provider. Each provider has its own folder. A folder is needed to hold the value accessor sets for the new provider.

To create a folder for the value accessor set:

  1. In Sitecore Content Editor, navigate to sitecore/System/Data Exchange/File System Provider Test/Data Access/Value Accessor Sets/Providers.

    Providers in the content tree
  2. On the Folder tab, click File System Value Accessor Sets to add a new set.

    Note

    This template is a command template. It does not prompt for the item name. Command templates assign the item name automatically.

Create a value accessor set

Next, you must create a value accessor set that represents all of the values you want to read from a row in the source file.

  1. Navigate to the new File System folder.

    File System folder in the content tree
  2. On the Folder tab, click Array Value Accessor Set to add a new set, and name it City Information File Fields.

Create the value accessors

For each value you want to read from a row in the source file you need a separate value accessor. When a row is read from the source file, it is split into an array. Each value accessor represents a position in that array.

  1. In the content tree, navigate to the City Information File Fields item.

    City Information File Fields item in the content tree
  2. On the Folder tab, click Array Value Accessor to add an accessor, and name it Identifier from City Information File.

  3. Set the following field value:

    Field

    Value

    Position

    0

  4. Save the item.

  5. Repeat step 1 to 4 to add two more Array Value Accessor items:

    Item name

    Position value

    Country from City Information Item

    1

    City from City Information Item

    2