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.  Extracting multilpe rows from a text file into one column

    Employee
    Posted 06-02-2011 05:04

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

    Originally posted by: Pooja

    Hi,

    I'm trying to import in some data from a few text files (emails originally) and I can't quite understand how to import in information contained within a few lines into one column.

    An extract from the text file is shown after the dashed line below

    I've managed to put the mobile number, SIM number, IMEI and handset into individual columns. The step I'm stuck on is putting " Hello, Sorry we are unable to process the below smart form as the account has been terminated." all into one column called "message".

    Any ideas?

    Thanks


    -----------------------------------------------------
    From: UPGRADES
    Sent: 11 October 2010 13:24
    To: Pooja
    Subject: 843204 [54776114] [V2.1]

    Hello,

    Sorry we are unable to process the below smart form as the account has been
    terminated.

    Kind Regards

    Sales Support Advisor

    Connection Type : Upgrade Of Existing Handset
    Request Date : 2010-10-09 16:02:06

    Mobile Number : 07777777798
    SIM Number : 8944125399708466666
    IMEI Number : 354345041557777
    Handset Type : Nokia 63


  • 2.  RE: Extracting multilpe rows from a text file into one column

    Employee
    Posted 06-02-2011 10:57

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

    Originally posted by: Tim Meagher

    Hey,

    It's a bit difficult to tell from just one email format exactly what you want to do.

    Do you simply want something to read in a set of autogenerated emails which all have the same format?

    If so, and if the format will always be as you show in the example you attached, then the attached graph should work fine.

    You can simply change the "ContentDelimiter" parameter on the agg node to join the parts of the message content back together how you want.
    In the attached graph I've used spaces (" ") as your post suggests you want.

    However, if you wanted the text in the output records to be formatted as in the email, you could simply set the "ContentDelimiter" to "\r\n" and then this field within the record will have newlines, where the email message content had newlines.

    Hope this helps,
    Tim.
    Attachments:
    ExampleReader.brg


  • 3.  RE: Extracting multilpe rows from a text file into one column

    Employee
    Posted 06-06-2011 01:26

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

    Originally posted by: Pooja

    Tim,

    Thank you for that - it's worked with multiple emails.

    Pooja