Expand my Community achievements bar.

SOLVED

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

Avatar

Level 2

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

 

1 Accepted Solution

Avatar

Correct answer by
Level 5

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

View solution in original post

1 Reply

Avatar

Correct answer by
Level 5

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