Data ingestion to RT CDP failing due to data type mismatch error | Community
Skip to main content
Level 2
June 14, 2023
Solved

Data ingestion to RT CDP failing due to data type mismatch error

  • June 14, 2023
  • 1 reply
  • 1361 views

Hi 

I am using Web SDK for data collection and then data is being sent to Adobe Analytics and CDP via a common datastream. During data ingestion we are facing data type mismatch error for fields having "true/false" or "yes/no" type of values. 

Here is one such error message 

 

The message can't be validated due to the data type error: #/_experience/analytics/customDimensions/eVars/eVar62: expected type: String, found: Boolean.

 

The Schema has these evars as String and not Boolean and these evars are getting values from the data element which in turn is using datalayer to fetch the values. 

We could not find any place where these evars or any variable related to these is set as Boolean on data collection side. 

Did anyone else face similar issue and found a resolution?

 

Thanks

Parm

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by adobechat

Hi @parm2 ,

The error message indicates that the data type of the incoming value for eVar62 is a Boolean (true/false), but the schema is expecting a string. If the source of the data is coming from a data layer or some other dynamic source, it may be that somewhere in your pipeline the data is being converted to a Boolean before it reaches Adobe.

Verify the actual data type of eVar62 in the data layer or the source where you are getting the values from. If the source itself is providing Boolean values, then you may need to convert these to strings before they are passed to Adobe.
Inspect your data pipeline: Look for any transformations or processing steps that might be changing the data type of eVar62 before it reaches Adobe. This could include any middleware, data processing scripts, or even a function in the Web SDK.

If you can't find where the data type is being changed, or it's not feasible to change it before it reaches the Web SDK, you could potentially modify your Web SDK implementation to explicitly convert the value of eVar62 to a string before passing it.

var eVar62Value = dataLayer.get("eVar62"); alloy("event", {"eVar62": String(eVar62Value)});

In the above, String(eVar62Value) will convert the Boolean eVar62Value to a string ("true" or "false"), which should be compatible with your schema.

Hope this resolves your issue.

Thanks

Madhan

1 reply

adobechat
adobechatAccepted solution
Level 5
June 14, 2023

Hi @parm2 ,

The error message indicates that the data type of the incoming value for eVar62 is a Boolean (true/false), but the schema is expecting a string. If the source of the data is coming from a data layer or some other dynamic source, it may be that somewhere in your pipeline the data is being converted to a Boolean before it reaches Adobe.

Verify the actual data type of eVar62 in the data layer or the source where you are getting the values from. If the source itself is providing Boolean values, then you may need to convert these to strings before they are passed to Adobe.
Inspect your data pipeline: Look for any transformations or processing steps that might be changing the data type of eVar62 before it reaches Adobe. This could include any middleware, data processing scripts, or even a function in the Web SDK.

If you can't find where the data type is being changed, or it's not feasible to change it before it reaches the Web SDK, you could potentially modify your Web SDK implementation to explicitly convert the value of eVar62 to a string before passing it.

var eVar62Value = dataLayer.get("eVar62"); alloy("event", {"eVar62": String(eVar62Value)});

In the above, String(eVar62Value) will convert the Boolean eVar62Value to a string ("true" or "false"), which should be compatible with your schema.

Hope this resolves your issue.

Thanks

Madhan