CDP: Issue with Ingestion API when Stringified JSON is being used in the field values of Data Stream
Last updated 2022-05-19 ·Reference W-10831075 ·Reported By 1 users
In Review
Summary
When we use ingestion API to insert Data into Data Streams, the stringified JSON in certain field values are randomly inserted by dividing the Stringified JSON based on the comma present.
Repro
1) Use Ingestion API to insert the Data into the Datastream
2) Pass the stringified JSON value into one of the fields or Attributes of the Datastream as shown in the example below
{
"data": [
{
"Field1": "testValue1",
"Field2": "TestValue5",
"Field3StringifiedJson": "[{\"productName\":\"Test7\",\"voucher\":\"AB7\"},{\"productName\":\"Test7\",\"voucher\":\"ABC7\"}]",
"Field4": 10,
"Field5": "true",
"Field6": 49935
},
{
"Field1": "TestValue2",
"Field2": "TestValue4",
"Field3StringifiedJson": "[{\"productName\":\"Test70\",\"voucher\":\"AB70\"},{\"productName\":\"Test70\",\"voucher\":\"ABC70\"}]",
"Field4": 10,
"Field5": "true",
"Field6": 49935
}
]
}
3) Server processes the stringified JSON under "field5stringifiedjson" into different fields instead of saving the complete stringified JSON into the single field "field5stringifiedjson" of Data Stream
Workaround
A new bug was created to address the JSON string formatted types. A workaround using extra quotes can be used to unblock in the meantime.
Example:
"shipAddress": "[{\"\"productName\"\":\"\"Test7\"\",\"\"voucher\"\":\"\"AB7\"\"},{\"\"productName\"\":\"\"Test7\"\",\"\"voucher\":\"\"ABC7\"\"}]"
Reported By (1)
Is it Fixed?
Any unreleased services, features, statuses, or dates referenced in this or other public statements are not currently available and may not be delivered on time or at all. Customers who purchase our services should make their purchase decisions based upon features that are currently available.