Using 'to_object' for Map attribute data preparation
Hi Team,
We have a requirement to ingest data into a map attribute.
Schema have a map attribute field and values will be ingested using Source database dataflows.
I have to use data prep function 'to_object' to ingest data.
While trying out with the sample code provided in document, it is not inserting any values into map field.
Eg: to_object(“firstName”, “John”, “lastName”, “Doe”) is not ingesting any values.
But, when I used to_object("Test Data",iif(lower(license)=='y',to_object('val','y'),to_object('val','n'))) in ingestion using dataflow, it was showing below result.
Result: [Test Data -> "(NULL,NULL,NULL,y)"]
If I'm referring to documentation, result should be {"Test Data" : {"val":"y"} }
Question: Why the result is not showing up for example provided in documentation.
Is there any way that we can validate why to_object(“firstName”, “John”, “lastName”, “Doe”) is not ingesting any values?
Also, if to_object is not the function that can be used for data prep, which function can be used?
I've referred document https://experienceleague.adobe.com/docs/experience-platform/data-prep/functions.html%3Flang%3Dsv#objects
@derekselby , @arpan-garg , please share your thoughts