In ADF pipeline am constructing JSON Array variable with multiple records. Is there any way to copy activity to Azure SQL from JSON Array variable? How do I map columns in Copy Activity mapping from this array?
Thanks,
Raj
In ADF pipeline am constructing JSON Array variable with multiple records. Is there any way to copy activity to Azure SQL from JSON Array variable? How do I map columns in Copy Activity mapping from this array?
Thanks,
Raj
Hi @PraveenAvadutha-9591 ,
Following up to check is below provided answer by @NandanHegde-7720 helps you? If yes, Please Accept Answer. Accepting answer may help community too.
Please let us know if any further queries. Thank you.
Hi @PraveenAvadutha-9591 ,
Just checking is below provided answer by @NandanHegde-7720 helps you? If yes, Please Accept Answer. Accepting answer may help community too.
Please let us know if any further queries. Thank you.
If you want to write the content of a variable of type Array, there is a workaround which works fine. Goal: write content of your array as 1 line per value of the array into a file
variable : [ a, b, c]
to
file content:
a
b
c
Steps:
Create an 'empty' file with 1 row , can be a json file or something else with just 1 row
Use the Copy Data activity with the single row file as source and your sink your target file
Use the additional column mechanism
Expand-join-with-carriagereturn the array variable with use of @join and @decodeUriComponent -> @join(variable,decodeUriComponent('%0A'))
Yes, it is a flaw that Microsoft doesn't have an @char(int) function to create a special character.(or I am an idiot and doesn't know the right way to concat an '\n' , which I tried but didn't work.)
Hey,
You can refer the below thread which is somewhat similar :
https://docs.microsoft.com/en-us/answers/questions/493585/write-pipeline-variable-value-to-csv-or-text-file.html
9 people are following this question.