Skip to main content
Level 3
September 26, 2023
Solved

Data Ingestion for Object Array field using File Upload method?

Hi team,
Please help me to ingest below data in data lake through file upload method

Sample file in below records:

PNameBirthdate
Jery|doll2023-03-10T18:56:41+00:00|2023-08-10T18:56:41+00:00
Tom|Marry2023-05-10T18:56:41+00:00|2023-08-10T18:56:41+00:00


on below schema for reference schema structure for reference:


Please provide the suggestion or guide me on the same.

We are expecting to getting similar records at dataset level:

PNameBirthdate
Jery|doll2023-03-10T18:56:41+00:00|2023-08-10T18:56:41+00:00
Tom|Marry2023-05-10T18:56:41+00:00|2023-08-10T18:56:41+00:00



Regards,
Sandip



arpan-garg
arpan-gargAccepted solution
Community Advisor
September 29, 2023

Hello, @sandip_surse 

This solution will suit your needs:

Transform the arrays using the following method:

arrays_to_objects("birthDate", explode(Birthdate, "\|"), "XYZName", explode(PName, "\|"))

I couldn't find the correct name for the 'Name' field in your schema, so I used 'XYZName' as a placeholder above.

Once you've completed this step, kindly map it directly to the object array. Make sure to remove [0] from the data mapping.
Thanks,

Arpan

5 replies

Verticurl
September 26, 2023

Please confirm a proper file format (.Parquet or JSON) for manual file uploads, not csv.

https://experienceleague.adobe.com/docs/experience-platform/ingestion/tutorials/ingest-batch-data.html?lang=en#add-data-to-dataset

Translate
Level 3
September 27, 2023
Hi Verticurl,

It's CSV file format data.
We are already across on this document also we are able to see data during the data preparation but still data is not yet ingested as we expected.

 

Translate
Verticurl
September 28, 2023

For source connector Local File Upload, make sure you enable Error diagnostics to generate detailed error messages, then check for errors on failed ingestion status.


Please review docs:
https://experienceleague.adobe.com/docs/experience-platform/sources/connectors/local-system/local-file-upload.html?lang=en
https://experienceleague.adobe.com/docs/experience-platform/dataflows/ui/monitor-sources.html?lang=en

Translate
arpan-garg
Community Advisor
arpan-gargCommunity AdvisorAccepted solution
Community Advisor
September 29, 2023

Hello, @sandip_surse 

This solution will suit your needs:

Transform the arrays using the following method:

arrays_to_objects("birthDate", explode(Birthdate, "\|"), "XYZName", explode(PName, "\|"))

I couldn't find the correct name for the 'Name' field in your schema, so I used 'XYZName' as a placeholder above.

Once you've completed this step, kindly map it directly to the object array. Make sure to remove [0] from the data mapping.
Thanks,

Arpan

Translate
Level 3
October 3, 2023

Thanks Arpan,
We are used similar way one more data prep function and now issue get fixed thanks...
to_array(true,split(attribute_Name,"|")

Translate