Expand my Community achievements bar.

SOLVED

Expected type: Integer, found: Double for 0

Avatar

Level 2

Hi, 

I got the following error with streaming data coming from an HTTP API connector:

The message cannot be validated due to the data type error. Expected type: Integer, found: Double.

 

When I looked at the failed batch, I see that the JSON field value associated with the error is 0

How is 0 not an integer in AEP?

Any clues or insights on how to proceed with this error?

 

Thanks 

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

@filouterrible So it was the 0.0 issue. Glad got sorted.

 

Cheers,

Abhinav

View solution in original post

9 Replies

Avatar

Community Advisor

Hey @filouterrible 

 

That's a weird issue.

Is the JSON value 0 or 0.0 ?

 

Can you share the payload with sensitive information blurred out or removed?

 

Cheers,

Abhinav

 

Avatar

Level 2

Hi @abhinavbalooni ,

The field value is 0. 

 

As for the failed payload, it looks like this (+ error message)

filouterrible_0-1704809346571.png

filouterrible_1-1704809525682.png

Our schema is fully custom.

Thanks 

Avatar

Community Advisor

Thanks for sharing the above @filouterrible 

 

Does seem to be weird. Let me try it once at my end and get back by tomorrow.

 

Cheers,

Abhinav

Avatar

Community Advisor

Hey @filouterrible 

I tried to replicate the issue at my end but was successfully able to ingest 0 in a field set to datatype Integer.

Seems to be an issue with the way your schema is setup at your end.

abhinavbalooni_0-1705019177653.png

 

Below is the postman payload with the attribute 'testInt' with 0 being passed.

 

abhinavbalooni_0-1705019015092.png

 

Ingested into AEP just fine. Screenshot below:

 

abhinavbalooni_1-1705019081876.png

 

Hope the above helps zero in on the cause.

 

Cheers,

Abhinav

 

Avatar

Level 2

Hi @abhinavbalooni

After carefully reviewing the issue. We realized that the issue was indeed at the source which was sending NUMBER 0.0 instead INTEGER 0. 

 

The initial confusion was due to the fact that AEP is showing incomeAmount = 0 in the error log (as shown in my previous API response screenshot) and in the UI.

filouterrible_1-1705028735021.png

Not sure how this is happening, but looks like a bug to me. 

Thanks for your help!

Avatar

Correct answer by
Community Advisor

@filouterrible So it was the 0.0 issue. Glad got sorted.

 

Cheers,

Abhinav

Avatar

Moderator

Hi @filouterrible 

 

Also check if there is any schema constraint defined on that field.

Is that JSON payload xdm compliant or you mapped a custom one?

 

Regards,

Arijit Ghosh

Avatar

Employee

Can you share the payload with Abhinav?