Skip to main content

Hey guys,

I am trying to build a model which will give me the "null" and "0" count for a number of attributes from my shp. I have built a model using the attribute validator with the Validation Rule "Not Null" to obtain all Null values coming out from the failed output into a statistics calculator transformer where I have "_count" for Total Count Attribute: under Calculate Attributes.

To obtain the "0" values for my other attributes I input my attributes in Attribute Validator and used the validation rule "Contains Regex" with the [0] rule configuration. However this is not the correct was a it will also include subsequent zeros e.g.. "10, 100, 1000 etc."

My questions are; is the above method the correct and most effective way to obtain Null values and how can I use the regex function in the Attribute Validator or any other transformer to obtain "0" values?

Thanks in advance:)!

I believe you should use the regex "^0$".

The ^ indicates the start, the $ indicates the end.


You could amend your regex to ^0$


You could also use an attribute creator with a conditional statement to create an attribute with value of 1 for any nulls or zeros and then sum these with a statistics calculator


Reply