Results 1 to 5 of 5

Thread: Delete all the NULL columns in a file

  1. #1

    Default Delete all the NULL columns in a file

    Hi Team,

    I have a file with about 100 attributes but about 50 of them are FULLY NULL. Is there a way to drop all these attributes or capture them somewhere as "NullAttributes" ??

    Thanks
    GK

  2. #2
    Lavastorm Employee
    Join Date
    Apr 2014
    Location
    Boston, MA
    Posts
    279

    Default

    Take a look at the attached. The key is using the 'Change Metadata' node. I use a filter which takes the 2nd output pin from the 'Data Analyzer' to mark all fields that contain only NULL's.
    Attached Files Attached Files

  3. #3

    Default

    Hi ryeh,

    This works fine. Thanks a lot for your help.
    Can you just elaborate a bit about "omitField" please.

    Thanks
    GK

  4. #4
    Lavastorm Employee
    Join Date
    Apr 2014
    Location
    Boston, MA
    Posts
    279

    Default

    In the 'Omit fields' filter, I check to see if there is only one distinct value of "none." If so, that means all the values are null. For these fields, I tag the field with a omitField of 1. For all other fields, omitField = 0. When I emit, I only emit when omitField = 0. This will give me a list of only the fields where there is actual data.

  5. #5

    Default

    Thank you Ryeh.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •