Shiv
Shiv

Reputation: 144

Append Variable Inside Foreach: Azure data factory

I am appending variable with a key column inside for each loop for each record processed

first for each for create, the second time for an update, for delete.(sequentially)

First, two-time(inside two for each) variables appends with correct id, but inside third for each the variable append value with \n value \n\n.

Any idea why these \n are appending with value.

enter image description here enter image description here

after third for each enter image description here

Upvotes: 0

Views: 2955

Answers (1)

NiharikaMoola
NiharikaMoola

Reputation: 5074

There seem to be some escape characters in your data for this ID value.

You can remove the escape character using replace().

Example:

enter image description here

Option1: To replace the escape character, replace enter (press enter instead of \n) and replace it with ‘’.

@replace(variables('id'),'
','')

enter image description here

Option2: Edit the JSON code of the pipeline (which is right side in the pipeline with brackets {}) and replace ‘\n’ with ‘’.

enter image description here

enter image description here

Upvotes: 2

Related Questions