on ‎2024 Jan 09 9:55 AM
Hello team,
How is it possible to set string or integer or number attributes to null?
I successfully activated data replacement https://help.sap.com/docs/customer-data-platform/apis/data-replacement?locale=en-US for the specific event.
However, it is unclear to me what needs to be sent in the payload in order to set the value to null/empty again. Sending null leads to an error.
Thanks! Best regards, Valentin
Request clarification before answering.
Hello v.rabitz,
1) As I know the purpose of Data Replacement is not to make empty single fields. Assuming you have emails:
{
"emails": [
"test1.user@gmail.com",
"test2.user@gmail.com",
"test3.user@gmail.com"
]
}
And you are going to ingest new entry:
{
"emails": [
"test4.user@gmail.com"
]
}If Data Replacement is Activated, you will get emails replaced by the new value, like:
{
"emails": [
"test4.user@gmail.com"
]
}If Data Replacement is Deactivated, you will get emails appended by the value, like:
{
"emails": [
"test1.user@gmail.com",
"test2.user@gmail.com",
"test3.user@gmail.com",
"test4.user@gmail.com"
]
}
2. Yes, you are right, setting null explicitly in CDP causes to error.
But you can use empty strings "", and make the value empty in your payload, like for the department below:
{
"events": [
{
"crmID": "0000000000",
"primaryEmail": "test.user@gmail.com",
"firstName": "Test",
"lastName": "Users",
"department": "",
"companyName": "Test company"
}
]
}
3. Please also take into account that for each Connector you can define a Data Quality Rank configuration.
Imagine you have 2 Connectors:
- Connector 1 with Good Data Quality Rank
- Connector 2 with Fair Data Quality Rank
If you ingested payload with {"department": 'IT'} in Connector 1, you cannot make it empty("") in Connector 2.
In other words, you can do it, but because of Data Quality Rank, you will not get an effect, as Connector 1 has higher Data Quality Rank configuration.
Hope the notes above helped you.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello v.rabitz,
Please use the POST Body API call for NULL as -
{ "replaceType" : " " }
https://cdp.eu5.gigya.com/api/businessunits/{businessUnitId}/applications/{sourceId}/dataevents/{eventId}/replaceConfig?userKey={userKey]&secret{secret}
I hope this was helpful to close the thread.
best regards,
Kunal, SAP CX Architect
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.