Expected type: Integer, found: Double for 0 | Community
Skip to main content
Level 2
January 8, 2024
Solved

Expected type: Integer, found: Double for 0

  • January 8, 2024
  • 3 replies
  • 2882 views

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 

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 abhinavbalooni

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.

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

Thanks for your help!


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

 

Cheers,

Abhinav

3 replies

abhinavbalooni
Community Advisor
Community Advisor
January 9, 2024

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

 

Level 2
January 9, 2024

Hi @abhinavbalooni ,

The field value is 0. 

 

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

Our schema is fully custom.

Thanks 

Level 2
January 12, 2024

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.

 

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

 

 

Ingested into AEP just fine. Screenshot below:

 

 

Hope the above helps zero in on the cause.

 

Cheers,

Abhinav

 


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.

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

Thanks for your help!

arijitg
Adobe Employee
Adobe Employee
January 9, 2024

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

Level 2
January 9, 2024

Hi @arijitg, I replied in the above comment 🙂

NimashaJain
Adobe Employee
Adobe Employee
January 10, 2024

Can you share the payload with Abhinav?