Carolina Karoullas
Carolina Karoullas

Reputation: 406

JSON column does not appear in flatten activity in data flow in Azure Data Factory

Using Azure Data Factory, I've copied data from an open-source API that requires no authorisation (https://directory.spineservices.nhs.uk/ORD/2-0-0/organisations/q73) and put into into an Azure blob storage account as a JSON file. Now I'm trying to flatten some columns in a data flow but I'm having issues. In my source, I have a particular column called End (Organisation.Roles.Role.Date.End). It exists in my source when I preview the data:

enter image description here

One thing I've noticed is that for some reason the column isn't being recognised as a date but the main issue is that in the flatten activity, the column does not exist when trying to set it as an input column for mapping:

enter image description here

I have set the Unroll by array to Organisation.Roles.Role.Date.

Does anyone have any idea about:

  1. Why this column is being read as a string rather than a date in my source activity?
  2. Why this column does not appear in the flatten activity?

Any help is appreciated! :) Apologies in advance if I've missed any information- I'm very new to this!

Edit:

If I add the below array to the input mapping:

enter image description here

The End column appears in the data preview (but I still can't select it specifically in the input data mapping):

enter image description here

So it is clearly there! I just can't map it as a separate column, which is what I want.

Upvotes: 0

Views: 1034

Answers (1)

Carolina Karoullas
Carolina Karoullas

Reputation: 406

I've figured it out! A silly mistake of course...

A previous version of the API endpoint I was using did not have an End column included (it was null for that particular OdsCode). Under the Projection section of the source activity in the data flow, I had imported the schema when only the previous version of the API endpoint was being included in my pipeline. I didn't re-import the schema when I included the new version of the API endpoint with the new column. Under the source activity, all I needed to do was hit this button and it auto-magically worked:

enter image description here

Upvotes: 0

Related Questions