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.  convert txt file into columns

    Employee
    Posted 08-27-2013 16:55

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

    Originally posted by: tekaleka

    hi...i have a txt file that i need to be converted into columns.The data i am dealing with consists of multiple txt files and i need to be able to convert it into table view with its fields and attributes. I managed to convert this but the output is mixed up ie. 'OctetsIn' from 'Uid' = "aaa" goes to 'OctetsIn' of 'UId'= "bbb". I can post my filter statement but i want a fresh approach to this please. I will post my approach if you guys need it.

    [2013-06-01 00:00:40]
    Type = Bytes
    UId = aaa
    CallingId =
    SessionSeconds = 13738
    OctetsIn = 1.50
    OctetsOut = 9.44
    [2013-06-01 00:00:51]
    Type = Bytes
    UId = bbb
    CallingId =
    SessionSeconds = 5592
    OctetsIn = 25.99
    OctetsOut = 132.75
    [2013-06-01 00:01:18]
    Type = Bytes
    UId = ccc
    CallingId =
    SessionSeconds = 2777
    OctetsIn = 6.88
    OctetsOut = 3.10

    I need it to be in the following format:

    Date,Time,Types,UId,CallingId,SessionSeconds,Octet sIn,OctetsOut
    2013-06-01,00:00:40,Bytes,aaa,,13738,1.50,9.44
    2013-06-01,00:00:51,Bytes,bbb,,5592,25.99,132.75
    .........


    thanks in advance


  • 2.  RE: convert txt file into columns

    Employee
    Posted 08-28-2013 13:02

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

    Originally posted by: rboccuzzi

    Sure, here is an example, attached. I'm sure there are a few ways to do it, but here's one. I didn't split the datetime up, but figured you should have enough to be all set.

    Cheers
    Rich
    Attachments:
    Example.brg


  • 3.  RE: convert txt file into columns

    Employee
    Posted 08-28-2013 13:51

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

    Originally posted by: tekaleka

    thanks....
    sorry but i got an "index out of bounds error: 1/1" error at the aggregation node..


  • 4.  RE: convert txt file into columns

    Employee
    Posted 08-28-2013 14:28

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

    Originally posted by: tekaleka

    sorry again...your example works..the error occurs when i use a large data set(30 days worth of data)


  • 5.  RE: convert txt file into columns

    Employee
    Posted 08-28-2013 17:12

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

    Originally posted by: stonysmith

    Check thru your input file, especially the last record of the file, to make sure that none of the records are blank.


  • 6.  RE: convert txt file into columns

    Employee
    Posted 08-29-2013 07:12

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

    Originally posted by: rboccuzzi

    It could be a blank line at the end, or it could be lines that don't conform to the proper pattern (first in group is a date/time inclosed in brackets, every other line has an =). You might want to put a filter in front of the agg to strip out lines that don't conform.

    Cheers
    Rich


  • 7.  RE: convert txt file into columns

    Employee
    Posted 09-11-2013 14:04

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

    Originally posted by: tekaleka

    much appreciated guys..found the problem to be the raw data