Results 1 to 11 of 11
  1. #1
    Join Date
    Jul 2012
    Location
    Ireland
    Posts
    815
    Provided Answers: 17

    Unanswered: Brilliant Database help needed

    Hi Guys.

    I've a TXT file which is a massive block of plain text generated by two Mobile Phone masts talking to each other.

    I was asked if I could write a program that could decode this text and populate a database so an engineer could easy and quickly read the contents.

    I've only one single problem to overcome and I need a little help.

    I've written the Parser Template and it works fine, except I'm not able to extract one piece of information because the markers are not the same through out the file. There is a marker on the line of text after the information I want to extract that I can jump to, but I'm able to get Brilliant Database to jump back to the start of the line of text I'm on to extract the data I need.

    Do you know how to do this ?
    Even if I could jump to the line above the marker I could go from there but the textLINE option does not allow me to use a - value.

    Regards
    James

  2. #2
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    I'd just pre-process the txt log file into a form that Brilliant could easily handle. If you can give me a little insight, I could almost certainly whip up a quick AWK or Perl script that would have you running happily.

    -PatP
    In theory, theory and practice are identical. In practice, theory and practice are unrelated.

  3. #3
    Join Date
    Jul 2012
    Location
    Ireland
    Posts
    815
    Provided Answers: 17
    Thank you Pat but I'm afraid that the data has to be processed fully under brilliant database. I've been studying the data and my original request is actually wrong.

    There is no set marker where I'm to extract this final bit of data. The marker is hinted in the first line of each block of text.

    I've set Brilliant Database to store the suggested marker as a variable, but it seems I cannot use variables in the Parser Template. I can set them, but I cannot seem to use them in the Parser to jump to the line of text I want to extract.

    So frustrating because I'm so close.

    Regards
    James

  4. #4
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    I'm pretty sure that the process is easy if you use the correct tool. I've never seen a database that was good at solving this kind of problem, and I'm pretty familiar with both databases and telecom log files!

    What you are doing has been done, too many times. Feel free to re-invent a custom wheel if that suits you! Let me know if I can help.

    -PatP
    In theory, theory and practice are identical. In practice, theory and practice are unrelated.

  5. #5
    Join Date
    Jul 2012
    Location
    Ireland
    Posts
    815
    Provided Answers: 17
    Hi Pat.
    Thanks for your help. I already have an Excel file that if I copy the text into, a macro will process the data for me onto a table in excel.

    Sadly though I must figure out how to do this in brilliant database because this data will be used as part of a bigger program.

    Regards
    James.

  6. #6
    Join Date
    Jul 2012
    Posts
    94
    Provided Answers: 4
    Send part of text file here, and describe what you want. I will try to help you.

  7. #7
    Join Date
    Jul 2012
    Location
    Ireland
    Posts
    815
    Provided Answers: 17
    Sure... File attached.

    I cut down the file so it only contains two blocks of text. Each block has 7 pieces of information I need populated into each record.

    You can see the two different blocks easily because there's a break between them. I normally just tell the Parser Template to separate the records by using two spaces and a [BR]

    So if you look at the first block of text.....

    The first piece of information I need is always the first line without the “ “
    2097 OMS1200/1 T01 P05 - 2100 PTN3900/2 14CD1-P1 3G (202097_5)

    The second piece is on line 21
    2097 OMS1200.1

    The third piece is also on line 21
    1-11

    And again, line 21 there is a “:” I need the value after that.
    1

    This next part is where everything goes wrong for me. I cannot jump to the next piece using the Parser Template

    Line 38, I need.
    2100 OMS1600/1
    If you look at the first line above you see 2100 PTN, this is how you know what value you need to search for. It's always the “number text /number”

    Same line, I then need the
    1-11:8

    And finally the last piece is the last part of the same line is the last 3 digits
    2-3-3

    All the above needs to be populated into a single record.

    You the your onto the second block of text for the second record. However, as you can see the format is not the same. There are more lines of text so I cannot get the Parser Template get the 5th 6th and 7th pieces of information in this block of text.

    Kind regards
    James
    Attached Files Attached Files

  8. #8
    Join Date
    Jul 2012
    Posts
    94
    Provided Answers: 4
    Quote Originally Posted by Tubbritt View Post
    ........
    .....
    Same line, I then need the
    1-11:8

    And finally the last piece is the last part of the same line is the last 3 digits
    2-3-3
    .....
    .......
    This information not on file, something wrong.

    Check the attachment. Working for 2 record, you can configure it to create record.
    Attached Files Attached Files
    Last edited by MacHeuS; 08-28-12 at 09:28.

  9. #9
    Join Date
    Jul 2012
    Location
    Ireland
    Posts
    815
    Provided Answers: 17
    Thanks a million for your help.
    That's certainly an interesting approach. I will look over all this and see if I understand.

    Thanks again.

    Kind regards
    James

  10. #10
    Join Date
    Jul 2012
    Posts
    94
    Provided Answers: 4
    I was wondering, Does it work?

  11. #11
    Join Date
    Jul 2012
    Location
    Ireland
    Posts
    815
    Provided Answers: 17
    Absolutely..!!!
    Thank you for all your help. I really appreciate it.

    Regards
    James

Posting Permissions

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