In this Page

Scenario

I want to take a CSV file and split the data out into two other CSV files. While this is not a typical use case for SnapLogic, it does provide examples of how to use several Snaps.

Requirements

Snaps Used

For this scenario, the following Snaps are used:

Other Requirements

Configuration

  1. Upload your CSV file to the SnapLogic file system. See the Files Page topic for more information.

  2. Create a new pipeline by clicking the + button on the left palette tab.


  3. Add and configure a File Reader Snap.
  4. Add a CSV Parser Snap. You will use the default configuration.

  5. Add and configure a Filter Snap. If your source file is a company directory and you only want data for the Sales team, you would configure the Filter Snap with an expression to restrict the data to just that, for example:

         $Department == "Sales"

    Be sure to select the expression toggle (=) in front of the field.

  6. Add and configure a Router Snap.
  7. (Optional) Add and configure two Sort Snaps, one off of each Router output. If you want to sort the data being written to the files, then you would add a Sort Snap.
  8. Add two CSV Format Snaps, one off of each Router output.  You will use the default configuration.

  9. Add and configure two File Writer Snaps, one off of each Router output.