问题
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-
- True Activity
- 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