Test multiple If condition in Azure Data factory and string equality test for the activities

邮差的信 提交于 2020-07-23 06:20:18

问题


I want to test a string value in Azure data factory.
Based on this String value my pipeline would get trigger.

I am collecting this value as a parameter from automation runbook.
If the parameter value is "Nike" then Nike pipeline will trigger and else some other pipeline. The If condition having two options-

  1. True Activity
  2. False Activity

so if the parameter does not match with a specified value then my false block would get trigger.
But I have multiple values hence True/False condition will not suffice my requirement.

So my first question is- Can we test more than one condition in ADF If condition activity so that whichever String value it matches that specific pipeline would get trigger, if not so then which activity should I use.

My second question is- How do I test the equality of parameter value so that I can trigger the specified pipeline.
below code I have tried but thrown the error. @equals(pipeline().parameters.clientName,'Nike')
Please note- clientName is the parameter name


回答1:


[![enter image description here][1]][1]

[1]: https://i.stack.imgur.com/lmK8k.pngstrong text

Did you try "Switch" activity ?

See below link: https://www.sqlservercentral.com/blogs/switch-activity-in-azure-data-factory-container-with-many-ifs



来源:https://stackoverflow.com/questions/62942001/test-multiple-if-condition-in-azure-data-factory-and-string-equality-test-for-th

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!