Hitachi Vantara Pentaho Community Forums
Results 1 to 3 of 3

Thread: Selecting rows by rownumber via looking up a range

  1. #1
    Join Date
    Aug 2009
    Posts
    5

    Default Selecting rows by rownumber via looking up a range

    Hi,
    I have an issue in parsing a text report which has a tabular format. There are subsections in report such that it starts with a header, gives information for consecutive 6-7 lines like below:
    REPORT CLASS=CLASS1
    CPU USage: %2 Weight=x Storage=120MB
    Performance Index=1
    .....

    REPORT CLASS=CLASS2
    CPU USage: %2 Weight=x Storage=120MB
    Performance Index=1
    .....

    I want to parse each attribute of different "REPORT CLASS"s. I can successfully identify each report class's start line and end line. I want to select the rows of text file by looking up startline and endline fields for each report class.

    Is there a way to perform this kind of lookup? (get the lines between startline and endline for each report class).

    Thanks and regards.
    Mursel Tasgin

  2. #2
    Join Date
    Sep 2007
    Posts
    834

    Default

    Here you have a sample ktr for identifying the rows belonging to each class.
    Then you can use the same javaScript for parsing each attribute:
    CPU Usage, Weight, etc.

    Finally, if you want each class in a single line, the Row Denormalizer step will help.
    Attached Files Attached Files

  3. #3
    Join Date
    Aug 2009
    Posts
    5

    Default

    Hi Maria,
    Thanks for your help. Your method resolved my problem.

    Kind regards.
    Mursel

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.