Walkthrough: Synchronizing data from a text file to Sitecore
This walkthrough tells you how to configure a pipeline batch that uses the file system provider to create and populate Sitecore items from the contents of a text file.
In this walkthrough, you create a file that contains information about different cities. Each row in the file represents a single city. Each city is represented in Sitecore as an item.
The synchronization process reads the cities from the file and creates Sitecore items for each. If a Sitecore item already exists for a city in the file, the Sitecore item is updated with the information from the file.
The walkthrough shows you how to perform the actions in the following table.
Action |
Topics |
---|---|
create a test import file |
Create a source file |
create a tenant to contain all the DEF items and settings needed |
Create a tenant |
prepare the Sitecore content database for receiving the imported values |
Create a template for target items Add a parent item for target items |
create components to read the lines from the source file |
Add an endpoint for the source file Add value accessors for the source file |
create components to write the lines to the Sitecore content database |
Add an endpoint for target items Add value accessors for the target items |
create a pipeline that receives a line from the source file, transforms its values, and writes them to the Sitecore content database |
Add a pipeline to read the source file Add a pipeline step to read data from a source file Add a pipeline step to iterate the data read from a source file |
create a pipeline that reads the source file, and calls the first pipeline for each line |
Add a pipeline to sync a single row from the source file Add a pipeline step to resolve the target item Add a pipeline step to apply mappings Add a pipeline step to update the target item |
create a pipeline batch that runs the pipelines in sequence |
Add a pipeline batch |
run the pipeline batch |
Test a pipeline batch |