LAE

Welcome to the LAE community!  Please feel free to start a discussion in the discussion tab or join in a conversation.

Discussions

Members

Resources

Events

 View Only
  • 1.  CSV file Input

    Employee
    Posted 02-17-2010 20:01

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: Rapkat

    I have a csv file I am using the Directory node to pick up the file. I use a csv node to bring in the data and add field names but I need to be able to delete the Header in the file.


  • 2.  RE: CSV file Input

    Employee
    Posted 02-18-2010 07:10

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: timonk

    Rapkat,

    When you say you need to delete the header in the .csv file, are you saying that, in addition to the specific column headers:
    ex.
    DATE,NAME
    01-03-2009,Bill
    12-10-2010,Bob

    That there is more information?
    ex.
    filename: mydata.dat
    DATE,NAME
    01-03-2009,Bill
    12-10-2010,Bob

    Regards,
    Timon Koufopoulos
    MDA Support.


  • 3.  RE: CSV file Input

    Employee
    Posted 02-18-2010 08:06

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: ltolleson

    If the header is the first record in your data set, then you can use a filter node to remove the first record.

    emit *
    where not(firstExec)


  • 4.  RE: CSV file Input

    Employee
    Posted 02-22-2010 16:11

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: Rapkat

    What about removal of the last record? And thanks Itolleson that was quick and easy.


  • 5.  RE: CSV file Input

    Employee
    Posted 02-24-2010 08:10

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: rboccuzzi

    To remove the last record, you would use an agg node, and put a constant, like the number 1 in the GroupBy parameter. For the code, you would write:

    emit *
    where not lastInGroup

    you could combine both this logic and the filter logic Larry gave you and do both with one Agg node, by writing:

    emit *
    where (not lastInGroup and not firstExec)

    Cheers
    Rich