Publish Web Layer is converting NULL values to 0 or empty string

180
4
02-15-2024 10:18 AM
FredSpataro
Occasional Contributor III

Hi All, 

Something happened since early December with either Pro or AGOL.    We have a feature service that gets updated on monthly-ish interval using the 'Overwrite Web Layer' button in ArcPro.  The polygon layer getting published has multiple INT and STRING fields where 'Allow Null=True' and many of the features have NULL values.  This was all fine and dandy when we last ran the update on 12/6/23.   Today when we ran the update, all the null values are converted to something explicit.  INT values are now 0, STRING values are now 'empty string'.  This basically broke our application code that expects NULL as well as symbols, query and everything else where NULLs were expected.  WTF?  Luckily we caught this in a TEST version before deploying to PROD.   

How do we get the data to publish as NULL? 

Screen shot of a REST endpoint query for the same data on the PROD (nulls correct) and TEST (nulls converted to 0):

FredSpataro_0-1707871363511.png

 

I ran a few other publish tests to verify it's not just the 'overwrite' and get the same results.  Here's screen shot from Pro of the features being published (source gdb) and the gdb that's extracted from the .SD file uploaded during the publish process.   The nulls are being converted sometime in the 'publishing process' 

FredSpataro_0-1708021058305.png

 

 

0 Kudos
4 Replies
Eugene_Adkins
Occasional Contributor III

Did you start using a newer version of Pro before the last overwrite and now?

Concerning the field in your screenshot, is it a text or numeric field? It sounds like the field is not numeric.

0 Kudos
FredSpataro
Occasional Contributor III

Hi Eugene,

(sorry replied on the wrong login)  

1. I don't think i've upgraded or patched my version of Pro since that last publish.  I'm running 3.1.2... looks like there's a 3.2.2 available so i'm going to see what happens if i update... 

2. sorry for the confusion... My screen shots are just examples of the INT field. I have multiple fields that allow NULL, if the field is an INT and value = NULL, the publish process sets the value = 0, If the fields is STRING and value = NULL, the publish process sets the value = {empty string} or "" when viewed in JSON. 

 

0 Kudos
Eugene_Adkins
Occasional Contributor III

In the aprx you used to create the service (and to overwrite), did any of the layers have their drawing order change by chance?

0 Kudos
FredSpataro
Occasional Contributor III

No i don't think so... the layer indices definitely stayed the same but those are defined in the properties 

0 Kudos