Expand my Community achievements bar.

Help shape the future of AI assistance by participating in this quick card sorting activity. Your input will help create a more effective system that better serves your needs and those of your colleagues.
SOLVED

Ingesting JSON Array column from SnowFlake into profiles

Avatar

Level 5

Hello All,

I have incoming data from SnowFlake in which one column ("SEGMENT_QUALIFICATION") is an array of objects. Below is the screenshot of the same:

pradeep_nextrow_0-1689293071551.png

I am using the SnowFlake connector and during the ingestion mapping step, I am using the "json_to_object" function to map it to the XDM fields that I have created and this is how it looks in the mapping step:

pradeep_nextrow_1-1689293223128.png

The dataflow is running, but I am not getting data in the target column - "custSegmentMembership" (the object is NULL when I query it after the run). I tried to use other mapper functions, but those were unsuccessful. Any insights on how to ingest it would be much helpful. Thanks in advance.

Below is how the schema is created:

pradeep_nextrow_2-1689293523495.png

 

 

1 Accepted Solution

Avatar

Correct answer by
Employee

@pradeep_nextrow I see you used custSegmentMembership[0], whereas it should be custSegmentMembership[*]. Let me know if this helps

View solution in original post

3 Replies

Avatar

Correct answer by
Employee

@pradeep_nextrow I see you used custSegmentMembership[0], whereas it should be custSegmentMembership[*]. Let me know if this helps

Avatar

Level 5

@jainarundeep Thanks for this. I tried just "custSegmentMembership" (the parent object without the "[*]") and it worked. I will also try the option that you had mentioned. Is there any best practice or recommendation here ( whether to use [*] or not)?

Avatar

Level 1

@pradeep_nextrow : I am trying to perform same thing (mapping snowflake Array column to AEP), but AEP is reading it as a string and giving error. Is it possible to share how you created:  "json_to_object" function that you mentioned above?