In ADF, I am not able to define the "Response body definition" in REST call (ExternalCall) in Mapping data flow

Viewed 132

pipeline

MY CURRENT PIPELINE

and I am trying to make an external call to my API which is an azure functions and the response of the API looks like

[
    {
        "customerTaxCountryCode": "CODE1",
        "customerTaxLocalName": "TAXLOCAL1",
        "customerTaxNumber": "TAX00023",
        "customerTaxCountry": "USA",
        "customerTaxTypeCode": "TAXNO1"
    },
    {
        "customerTaxCountryCode": "CODE2",
        "customerTaxLocalName": "TAXLOCAL2",
        "customerTaxNumber": "TAX9544",
        "customerTaxCountry": "USA",
        "customerTaxTypeCode": "TAXNO2"
    }
]

I tried importing the schema by clicking Import Projection, but it is giving the irrelevant response

error response

I tried writing the complex structure as ,

(customerTaxTypeCode as string, customerTaxCountryCode as string, customerTaxLocalName as string, customerTaxNumber as string, customerTaxCountry as string )[]
not getting mapped

still, the data is not getting mapped.

1 Answers

This isn't the right approach.

To read the data from API, you need to use Web activity to fetch the data.

Use @activity('Web1').output.Response expression at second web activity to save the output as a blob to the container.

enter image description here

Once data stored in blob storage, you can create a linked service for it and read the data in data flow activity and then you can transform it easily.

Related