Skip to main content

Hi All,

I have a feature class with 351 columns and need to know which columns contains ALL the records as <Null>. I have tried the AttributeValidator transformer but it doesn’t seem to do what I want as all the records go to Failed and there’s definetly columns with all records as <Null>, see below:

 

The ‘Attributes to Validate’ have been included the 351 columns,

Any ideas how to approach this issue?

Thanks :)

My immediate thought would be to put these all in a list that way you have one feature with lists for the attributes. Then you can remove duplicates from the lists and test to see which lists then only have 1 element (and that the element is null). This is pretty clunky, especially if you have a lot of columns, so I am hoping there is a better way and will keep thinking about it.


Thanks ​@liamfez I was able to identify those fields with all <null> values by following the steps explained by ​@nielsgerrits here: 

 

...the total number of attribute fields with all <null> are 31.

 

How can I drop those fields from the original data? I’m thinking about using some dynamic gdb writer, see below:

 


That looks good.

Yes I think a dynamic writer would be the way assuming no prior knowledge of which columns are entirely null. You could potentially use your attribute selection to make a schema and then have your original data align to that.


Thanks ​@liamfez for the feedback...yes I’m struggling to transpose the rows into columns and having the schema before writing the data into the gdb…

...if you know any trick to transpose the following table into columns please let me know! :)

 

 


Reply