Copy Activity writing an empty value from REST API to SQL DW when preview is correct

Caio Henrique Segawa Tonetti 1 Reputation point
2020-11-05T13:24:52.36+00:00

Hi,

I have an copy activity to copy an value from an REST API to an SQL DW. I configured the source and I can even get a correct preview of the value and correct mapping (mapped the name of the value I wanted to the correct sink on the DW by using the import schema). But when I debug/trigger the pipeline the value written to to the DW is an empty string.

So, the copy is creating a new row that is not null and not writing the value from the REST API, even though the value is correct in the preview. What is happening?

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
10,568 questions
{count} votes

1 answer

Sort by: Most helpful
  1. HarithaMaddi-MSFT 10,136 Reputation points
    2020-11-12T08:26:33.333+00:00

    Thanks @Caio Henrique Segawa Tonetti for sharing the approach used. One more point observed was to use casting to JSON when assigning parameter/previous activity output to dynamic mapping in copy data as below. It is to ensure that value is properly treated as JSON, please check if this helps in resolving using directly the API response in ADF.

    @json(pipeline().parameters.testparam)  
    
    1 person found this answer 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.