ADF copy activity issue with REST as source, JSON in ADLS as sink

Akanksha Kumari 1 Reputation point
2022-09-13T11:59:20.873+00:00

Hi,

I am pulling API data. I have a copy activity with the source as REST and sink as JSON to store in ADLS. The link service test for the REST is successful. Also I'm able to "preview data" on source in Copy activity But during the debug run following error throws up-

Error code: 2200
Failure type: User configuration issue
Details: Failure happened on 'Source' side. ErrorCode=UserErrorFailToReadFromRestResource,'Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=An error occurred while sending the request.,Source=Microsoft.DataTransfer.ClientLibrary,''Type=System.Net.Http.HttpRequestException,Message=An error occurred while sending the request.,Source=mscorlib,''Type=System.Net.WebException,Message=The underlying connection was closed: An unexpected error occurred on a send.,Source=System,''Type=System.IO.IOException,Message=Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.,Source=System,''Type=System.Net.Sockets.SocketException,Message=An existing connection was forcibly closed by the remote host,Source=System,'

pipeline run ID = 5d75885d-c1a1-4694-b4ed-50a278f63011

If I'm using a WEB activity for "GET" method instead of the COPY activity , it works. But that is not beneficial for my case since WEB activity has a execution output limit of 4MB. So I'd rather use the Copy activity with REST source.
Could you please help!

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

2 answers

Sort by: Most helpful
  1. AnnuKumari-MSFT 31,061 Reputation points Microsoft Employee
    2022-09-14T09:19:33.027+00:00

    Hi @Akanksha Kumari ,
    Welcome to Microsoft Q&A platform and thanks for posting your question here. As I understand your issue, you are facing an error while trying to copy data from REST API to .json file in ADLS.

    Kindly make sure you are providing correct authentication details and headers.

    Please add content-Type : application/json as header (if not done) as shown in the below video .

    240947-restapicall.gif

    For more details, kindly check this thread post.

    Hope this will help. Please let us know if any further queries.

    ------------------------------

    • Please don't forget to click on 130616-image.png or upvote 130671-image.png button whenever the information provided helps you.
      Original posters help the community find answers faster by identifying the correct answer. Here is how
    • Want a reminder to come back and check responses? Here is how to subscribe to a notification
    • If you are interested in joining the VM program and help shape the future of Q&A: Here is how you can be part of Q&A Volunteer Moderators

  2. psungure 0 Reputation points
    2023-10-03T21:32:57.2866667+00:00

    I had the same issue and it took me a long while to sort it out . The problem for me was related to the AutoResolveIntegrationRuntime of the copy activity. The copy activity has a source and a sink; both being integration datasets, one a Rest and the other one a JSON/Parquet and each is referencing a linked Service . What I did was to navigate to the linked services tab and open the JSON representation of each of the two then manually deleted the following section :
    User's image

    So I made sure that none of the linked services that are referenced in my pipeline (directly or indirectly by integration datasets) have the above section in their JSON representation and that solved the problem for me.

    0 comments No comments