ADF Issue with using Concat in Variable in Pipeline....Please Help!

Mike Kiser 1,531 Reputation points
2020-12-07T16:09:43.9+00:00

Hello,
Can you please assist? I am trying to use the following in a Variable to pass as a Body to a Web Activity.
I am getting the following error:

ErrorCode=InvalidTemplate, ErrorMessage=The expression 'concat('{
"EmployeeNumber":"' @activity('Look Up Employee ID in Success Factors').output.values.employeeid','"
"FirstName": "Henry",
"LastName": "Loescher",
"EmploymentStatuses": {
"Items": [
{
"EmployeeNumber": "010004",
"EffectiveStart": "2017-01-15T00:00:00",
"EmploymentStatus": {
"XRefCode": "ACTIVE"
},
"PayType": {
"XRefCode": "Salaried",
"ShortName": "string",
"LongName": "string",
"LastModifiedTimestamp": "2020-12-04T04:42:27.193Z"
},
"PayClass": {
"XRefCode": "FT"
},
"BaseSalary": 10.25,
"EmploymentStatusReason": {
"XrefCode": "NEWHIRE"
}
}
]
}
}
)' )' is not valid: the string character '@' at position '34' is not expected."


Here is my Variable...I'm trying to put the value of employeeid in the string:

@markus.bohland@hotmail.de ('{
"EmployeeNumber":"' @activity('Look Up Employee ID in Success Factors').output.values.employeeid','"
"FirstName": "Henry",
"LastName": "Loescher",
"EmploymentStatuses": {
"Items": [
{
"EmployeeNumber": "010004",
"EffectiveStart": "2017-01-15T00:00:00",
"EmploymentStatus": {
"XRefCode": "ACTIVE"
},
"PayType": {
"XRefCode": "Salaried",
"ShortName": "string",
"LongName": "string",
"LastModifiedTimestamp": "2020-12-04T04:42:27.193Z"
},
"PayClass": {
"XRefCode": "FT"
},
"BaseSalary": 10.25,
"EmploymentStatusReason": {
"XrefCode": "NEWHIRE"
}
}
]
}
}
)' )

Thanks!
Mike Kiser

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

1 answer

Sort by: Most helpful
  1. Saurabh Sharma 17,366 Reputation points Microsoft Employee
    2020-12-08T21:00:14.697+00:00

    @Mike Kiser Thanks for using Microsoft Q&A.
    I could see that you are using multiple @ in the variable content - @markus.bohland@hotmail.de ('{
    "EmployeeNumber":"' @activity('Look Up Employee ID in Success Factors').output.values.employeeid','"

    You need to specify @ at the outer call only e.g. @markus.bohland@hotmail.de ('{
    "EmployeeNumber":"' activity('Look Up Employee ID in Success Factors').output.values.employeeid','".

    This may be causing the issue.
    I believe that you are able to concat strings as you have mentioned in another thread over here. Please let me know if that's the case if @ was the issue.