cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

[5-Minute Exercise] How to reassign fields using the Router Snap

Karen
Former Employee

Difficulty Level: Easy

In this exercise, you will learn how to reassign employees to another team by:

  • Using the Router Snap in a sample pipeline
  • Changing fields on the Expressions builder within the Router Snap

Watch this 3-minute video that walks through this exercise:

The sample pipeline for this exercise is for a mergers & acquisitions use case. When a company is acquired, HR receives a CSV file containing employee information from that company and wants to route a list of employees to department heads for review, including Customer Success, General & Administration (G&A), Sales & Marketing, and Engineering.

During the first pass of reallocating departments, the Asset Management team was assigned to General and Administrative (G&A). Upon further inspection, it was determined that the team should actually be part of Engineering. In this exercise, we will reassign the Asset Management team to Engineering.

Step 1: Make sure you have copied the sample pipeline (Sample_Pipeline) from the Shared folder within the Pipeline Catalog to your own project folder

406fd7be94d214ad86b2a14d6c6431b98a4c188f.png

Step 2: Click image to validate and preview the data in the pipeline. Once the pipeline is validated, the pipeline will turn green. Click to open the Router Snap.

a0e5926eee768538f213dafcfe2252b241287d35.png
The expressions here follow the logic of โ€œif a Department is either A or B or Cโ€ฆ, send it to the new department of AA; if D or E of F, send to BBโ€

Step 3: Once you open the Router Snap, go to the Expressions field for the G&A row, click on the down arrow. This will open a drop-down menu.

90a3cb16e5ac2b8b74b4c46ef30cfb9b18509866.png

Step 4: Within the drop-down, click on the icon in the upper right corner to open the Expression builder.

aaef288729e854839406cdbbd8643b4fc4a2710d.png

Step 5: Within the expression, remove || $Department ==โ€œAsset Managementโ€. Then Click OK to close the dialog.

b83d9b9892a1a8e9b122ae4a4cfdb0f1894eee9b.png

Step 6: In the Expressions field for the Engineering row, click on the arrow, then open the Expression builder. Between Developmentโ€ and the ending parenthesis, add || โ€œAsset Managementโ€, so you end up with $Department == โ€œQuality Assuranceโ€ || $Department == โ€œResearch and Developmentโ€ ||$Department == โ€œAsset Managementโ€. Click OK, then Save.

56813e57b8bc1aa8591d2f41198b19c6602c46db.png

Step 7: Click on image to validate the pipeline. The sample pipeline is ready to be executed, you can click on f94f3438-034f-4696-b74d-c17799ffb2d3 on the toolbar. The sample pipeline will turn green once itโ€™s successfully executed.

Step 8: Go to the SnapLogic Manager and in your project folder, you can view and download the updated Engineering list.

Congratulations! You have completed this pipeline exercise!

Need more help?

You can launch the step-by-step exercise and additional resources on the SnapLogic Knowledge Center image on our SnapLogic platform, or peruse through the categories and topics on the SnapLogic Community.

Not in the trial but want to try this exercise? Upload this pipeline to your project in SnapLogic.
Sample_Pipeline.slp (23.3 KB)

[ The SnapLogic Knowledge Center is only available within the SnapLogic Free Trial. ]

0 REPLIES 0