Reputation: 287
All my data is in a .txt file, Field delimiters are Comma and Newline. So I used the "Var. File" component as Source component.
I am trying to figure out how to delete the rows containing null values, and then get the output for further processing.
Upvotes: 5
Views: 7702
Reputation: 426
To discard any records in IBM SPSS Modeler, you would use the "Select" node from the "Record Ops" palette.
To discard any record that contains a missing value for a given field, you can set the "Mode" to "Discard" and use the condition: @NULL( field1 )
if the name of the field is "field1".
If you have a list of fields and require all of them to have non-missing values, you can use a condition such as: count_nulls( [ field1 field2 field3 ] ) > 0
if the fields are "field1", "field2", and "field3".
If you wish to discard all records where any field contains a missing value, you can use the condition: count_nulls( @FIELDS_MATCHING( "*" ) ) > 0
.
If you are looking to discard the records that have only missing values, you can use the condition: count_non_nulls( @FIELDS_MATCHING( "*" ) ) = 0
.
Upvotes: 8