Array contains

Ryan Abbey 1,186 Reputation points
2021-08-24T00:32:52.24+00:00

The below is getting a "Unable to parse expression" error, anyone can tell me what is wrong?

@if(contains([1,2,3,4,5,6,7], item().PipeRoute), 'PC', 'PC2')

Basically, item().PipeRoute is a number, if it is between 1 and 7, I want the result to be "PC" else "PC2"

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
0 comments No comments
{count} votes

Answer accepted by question author
  1. Ryan Abbey 1,186 Reputation points
    2021-08-24T03:21:02.45+00:00

    It would appear that Data Factory doesn't recognise [] as an array, you have to createArray(1,2,3...)


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.