Reputation: 162
In an Azure Data Factory pipelin, I need this expression to evaluate true:
@bool(split(item().Name,'provider').Length>1)
For context, item().Name is "provider_file.xlsx". (Thus I expected true)
Here's the error I'm getting:
Failed
{"code":"BadRequest","message":null,"target":"pipeline//runid/f16e4701-950f-4005-88c7-c4afc68b493f","details":null,"error":null}
Upvotes: 0
Views: 8484
Reputation: 8660
Array.Length caused this error. You should use length() function to get array's length. This is an expression equivalent to your expression: @greater(length(split(item().name,'provider')),1)
.
The shortest expression to do this is:@contains(item().name,'provider')
. Contains function can be used to check whether can find a substring in a String.
Upvotes: 4