cancel
Showing results for 
Search instead for 
Did you mean: 

[5-Minute Exercise] How to add a new output field using the Router Snap

Karen
Former Employee

Difficulty Level: Medium

In this exercise, you will learn how to add a new department and route employees from one department to the new one by:

  • Adding a new output view (new department) in the Router Snap
  • Adding a new expression (employees) to the output view in the Router Snap
  • Executing the pipeline to get a list of employees for the new department

Here is a 4-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.

The company has decided to create a new department, Support, and re-assign some employees from Customer Success to Support.

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, and you can click on the file icon to preview the data. Then open the Router Snap.

a0e5926eee768538f213dafcfe2252b241287d35.png

Step 3: Go to the Views tab. Click the + under Output and name the new output view Support.

ddc60def6252252723746eb7b22bcfa220e51a2d.png

Step 4: Go back to the Setting tab. In the Routes section, click + to add a new row. Set the Output view name to Support. Copy the expression from the Customer Success row and paste it into the Support’s expression field.

d07debb0284724190bf622709303405f5e50fe3b.png

Step 5: Open the Expression builder by clicking on the arrow, then the icon in the drop-down to see the expressions for the department.

83f39aab74e0226d16a2b24e8478840311e72e84.png

Step 6: Remove $Department == “Customer Relations”||, because we want to re-assign employees under Customer Service and Tech Support to the new Support department. Click OK.

7b0d60c9f640b4217c39c936b8f71b9a279c8a5d.png

Step 7: Let’s go back and open up the Expression builder in Customer Success and only keep $Department == “Customer Relations”. Save and close the Router dialog.

10df9459876e7bd409904cc9e052a465953bf8fa.png

Step 8: You want to add Sort > Excel Formatter > File Writer Snaps to complete the pipeline. On the Designer canvas, hold the Shift key down, then click and drag select one set of Sort > Excel Formatter > File Writer Snaps from the other departments. Right-click on the selection and select Copy. Right click next to the Support output and select Paste.

If there is not enough room to paste it there, click the Zoom Out button in the toolbar, then try to paste the segment under the pipeline and drag it into place. Click the circle between Support and Sort to connect them.

a1e0ebc17e5370da23043fbe29fab2e0cd21d127.png

Step 9: Open the File Writer Snap, change the Filename to Support.xls and click Save.

e8f17346f89683c2feea923ebd55bf24004ae603.png

Step 10: 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 11: Go to the SnapLogic Manager and in your project folder, you should now have 5 files, including the Support list.

3ee012f6d78ae370dc18e02c4aac56422840e5d1.png

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 b5f6f864701935657c6d57928a79f2755d8615e9.png 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