user3060571
user3060571

Reputation: 131

Set variable in Azure data factory

I’m wondering if someone can help us out here as we are going round in circles. In short we are trying to;

  1. Read a value from a SQL table via a stored procedure in a lookup task.
  2. We want to use that value to set a variable so we can use it in a copy data task.

However our set variable task using (@activity('Lookup1').output) returns the value but its wrapped in lots of JSON (see attached). In the attached we are only interested in the TokenGUID value, not the rest of the JSON.

So can someone please point us in the direction of how we would set a variable to be a string value.

Thanks,

enter image description hereNic

Upvotes: 0

Views: 5536

Answers (1)

Steve Johnson
Steve Johnson

Reputation: 8660

You can use this expression to get TokenGUID:

@activity('Lookup1').output.firstRow.TokenGUID

My test:

Output of Lookup activity enter image description here

Output of Set variable activity enter image description here

Upvotes: 2

Related Questions