ADF Copy Data REST API , putting JSON response to SQL Table

Mav 81 Reputation points
2022-02-04T04:42:50.03+00:00

Hi,
I am trying to call an API using REST connector in COPY DATA .
However when I use SQL Table in SINK and run pipeline, the JSON is not getting stored in the table

instead the NULL value is being inserted into the table.

I have not defined any mapping as I want full JSON string to be inserted into one column of the table defined in SINK

Any help ?

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,341 questions
Azure Databricks
Azure Databricks
An Apache Spark-based analytics platform optimized for Azure.
1,917 questions
Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
9,541 questions
{count} votes

1 answer

Sort by: Most helpful
  1. ShaikMaheer-MSFT 37,896 Reputation points Microsoft Employee
    2022-02-07T08:18:43.05+00:00

    Hi @devhere ,

    Thank you for posting query in Microsoft Q&A Platform.

    Using Copy activity with REST connector as source data source will not help in this case, as your requirement is store entier json as string in to your sink table column.

    Kindly consider below implementation.

    Use web activity to make API call and get json. Then use Set variable activity to store web activity output json as string in to an variable. Then use copy activity additional column field to add extra column on source dataset for this json data. Then under copy activity mappings, map your additional column to desired sink table column.

    Please check below screenshots for better idea.
    171832-image.png

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

    -----------

    Please consider hitting Accept Answer. Accepted answers helps community as well.

    2 people found this answer helpful.