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.  Flat file with no record delimiter

    Employee
    Posted 10-08-2013 00:39

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

    Originally posted by: ThomasT

    I have this text input with semicolon separated data that i am trying to read into LAE.
    I know the number of columns, but there is no record separator in the file.

    Is there a way i can define the input to read in for example 8 columns and then separate the record?

    i am attaching a sample..sample.txt


  • 2.  RE: Flat file with no record delimiter

    Employee
    Posted 10-08-2013 01:56

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

    Originally posted by: ThomasT

    Solved it by using TextPad.
    It automatically puts in the EOL value in the record.


  • 3.  RE: Flat file with no record delimiter

    Employee
    Posted 10-27-2013 07:35

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

    Originally posted by: Tim Meagher

    Hi,

    Could you post/PM the configured node you have used to import this data into the LAE once the windows EOL has been added by TextPad?

    I think the problem with the file is not that it doesn't have a record separator, but that the record separator is a Unix style /n (0x0a) rather than a windows/dos style \r\n (0x0d0a).
    Therefore, the delimited node needs the record delimiter to be expressed as \n

    However, there is another problem, in that the sample shows that the last field in each line has a field delimiter.
    The delimited file node doesn't handle this correctly - it assumes that per record, the content between the last field delimiter and the record delimiter indicates another field.
    Therefore the last field is blank.
    When it attempts to set the metadata, the last field has no content, and it is unable to set a field name to an empty string, therefore the node fails.

    I'm not sure there is a simple workaround for this in the Delimited File node - although I'd like to see your solution once TextPad has added the windows EOL characters - perhaps you've already found a solution to this part of the problem.

    In any case, without this, if you want to be able to read in such files automatically without first opening them in TextPad, then I've attached an example graph that should be able to do this for you.
    It simply reads in each line of the file as one record, associates a record ID with each, and associates a "group Id" with each field for each record.
    The record for each header field is then attached to each corresponding record for each data field, then a pivot is used to setup the field names correctly at the end.

    Regards,
    Tim.
    Attachments:
    ExampleDelimited.brg


  • 4.  RE: Flat file with no record delimiter

    Employee
    Posted 11-21-2013 04:27

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

    Originally posted by: ThomasT

    Thank you so much for the node Tim.

    I do not have the data og graph available anymore, but i will save the graph if the problem would show up again.

    Thomas