Dataflow expression builder - Mapping API response

Jan Re 21 Reputation points
2022-10-04T16:49:52.613+00:00

I am trying to map the API response in Dataflow expression builder in External Call connector and can't get past a parsing error "Could not parse body of response, please check provided schema against response" when I go to preview the results.

The response payload is:

{
"Addresses": [
{
"Address1": "string",
"Address2": "string",
"City": "string",
"State": "string",
"Zip": "string",
"IsResidential": "string",
"DPV": "string",
"DPVDesc": "string",
"DPVNotes": "string",
"DPVNotesDesc": "string",
"Corrections": "string",
"CorrectionsDesc": "string",
"BarcodeDigits": "string",
"CarrierRoute": "string",
"CongressCode": "string",
"CountyCode": "string",
"CountyName": "string",
"FragmentHouse": "string",
"FragmentPreDir": "string",
"FragmentStreet": "string",
"FragmentSuffix": "string",
"FragmentPostDir": "string",
"FragmentUnit": "string",
"Fragment": "string",
"FragmentPMBPrefix": "string",
"FragmentPMBNumber": "string"
}
],
"IsCASS": "string",
"Error": {
"Desc": "string",
"DescCode": "string",
"Type": "string",
"TypeCode": "string"
}
}

So in Expression builder I have:

(Addresses as (Address1 as string,
Address2 as string,
City as string,
State as string,
Zip as string,
IsResidential as string,
DPV as string,
DPVDesc as string,
DPVNotes as string,
DPVNotesDesc as string,
Corrections as string,
CorrectionsDesc as string,
BarcodeDigits as string,
CarrierRoute as string,
CongressCode as string,
CountyCode as string,
CountyName as string,
FragmentHouse as string,
FragmentPreDir as string,
FragmentStreet as string,
FragmentSuffix as string,
FragmentPostDir as string,
FragmentUnit as string,
Fragment as string,
FragmentPMBPrefix as string,
FragmentPMBNumber as string),
IsCass as string,
Error as (Desc as string,
DescCode as string,
Type as string,
TypeCode as string))

I was thinking the complex type is the issue but there are two complex types, when I remove the first one it works like this:

(Addresses as string),
IsCass as string,
Error as (Desc as string,
DescCode as string,
Type as string,
TypeCode as string))

But I would think the first complex type would work the same as the second, the error complex type.

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

Accepted answer
  1. MartinJaffer-MSFT 26,061 Reputation points
    2022-10-05T21:39:23.5+00:00

    Hello anonymous usere-7330 and welcome to Microsoft Q&A.

    There is one difference between the two complex types you are overlooking.

    The first one is an [array] of complex objects. The second is a single complex object. You are specifying the object's details correctly, but miss indicating it is a collection/array.

    I'll go look up how the array is indicated.

    2 people found this answer helpful.

0 additional answers

Sort by: Most helpful