Azure synapse copy activity REST source and ADLS Gen2 sink

Raj D 616 Reputation points
2023-04-03T19:23:14.5+00:00

Greetings Hi, I'm running into an issue with my output json file. In Azure synapse copy data activity I use a REST api source and ADLS Gen2 sink where I create a json file in a container. When I look at the REST api output in Postman I see the json output like below. Postman:

{"data":[{"JsonOutput":"1"}]}

But, in Azure synapse after running the pipeline, If I look at the json file in the container I see the json output like an array below. Synapse:

[{"data":[{"JsonOutput":"1"}]}]

Not sure why the json output is enclosed between [ ], Like an array. In the copy activity sink I have it configured like below. User's image

What might be causing this issue or how to fix it? Also, how to set content-type to application/json when the json file is saved to the container? Thank you.

Azure Data Lake Storage
Azure Data Lake Storage
An Azure service that provides an enterprise-wide hyper-scale repository for big data analytic workloads and is integrated with Azure Blob Storage.
1,559 questions
Azure Synapse Analytics
Azure Synapse Analytics
An Azure analytics service that brings together data integration, enterprise data warehousing, and big data analytics. Previously known as Azure SQL Data Warehouse.
5,375 questions
0 comments No comments
{count} votes

Accepted answer
  1. ShaikMaheer-MSFT 38,546 Reputation points Microsoft Employee Moderator
    2023-04-05T11:10:09.3133333+00:00

    Hi Raj D, Thank you for posting query in Microsoft Q&A Platform.

    In Copy Activity Under Sink tab, for File Pattern option, make sure you select nothing or Set of Objects. Also make sure inside sink dataset you are not importing any schema.

    Please note, I see you already selected Set of Objects but may be you have not published that changes. Try to publish changes or run in debug mode and see. I tried at my end with Set of Objects option, its working fine for me without any array symbol. Hope this helps. Please let me know how it goes and if any further queries.


    Please consider hitting Accept Answer button. Accepted answers help community as well.


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.