Forum Discussion

nitinrahim's avatar
nitinrahim
Brass Contributor
May 09, 2024

Number fields rounding off in Cosmos Db from Azure Portal

Hi Azure Cosmos Db Team,

 

We are seeing an issue from Portal in Cosmos Db. When we enter a numeric field in cosmos db from portal for eg

 

"digittest": 123456789123456789
 
it is rounding of to 
"digittest": 123456789123456780
 
Saw this behavior after 16 characters.
 
Thought the issue is with portal ( related to java script).So tried using the sdk. When using JAVA SDK we saw we were able to retrieve the same value we created with sdk. However when we update another attribute in document in the portal and then retrieve the same document from sdk we are seeing the portal saved value for the number even though we didn't update the LONG number field . Can you please confirm for LONG fields and INT fields we can save and see the same way in portal and from sdk irrespective of length? This can be very misleading.
 
With Regards,
Nitin Rahim

Resources