Hitachi Vantara Pentaho Community Forums
Results 1 to 7 of 7

Thread: Files with multiple headers

  1. #1
    Join Date
    Sep 2012
    Posts
    19

    Default Files with multiple headers

    Hi,

    I have a file with such a structure :
    - 1 Header row (Row beginning with 1)
    - Many Detail rows (Rows beginning with 3)
    - 1 Footer row (Row beginnning with 9)

    This structure can be repeated several times.

    I need to populate one table with information got from detail but also from the last header (The header of the current structure).

    I attach an example to the post.
    MulipleHeaders.txt

    Regards,

    Jer

  2. #2
    Join Date
    Jun 2012
    Posts
    5,534

    Default

    You should provide a CSV file showing the expected output generated from your sample input.
    Makes it so much easier to help...
    So long, and thanks for all the fish.

  3. #3
    Join Date
    Sep 2012
    Posts
    19

    Default

    Hi,

    You will find attach the csv file of the expected result.
    Result.txt

    Thanx for help.
    Regards,

    Jer

  4. #4

    Default

    Hi,
    I think you will find the solution at http://forums.pentaho.com/showthread...l-report-files

  5. #5
    Join Date
    Sep 2012
    Posts
    19

    Default

    Thanx a lot
    It work perfectly. I put the grouping zone on the first code, treat the 1 line as headers, treat the 3 lines as details, and write the other to log (to trash them).
    I have to test it on large files but on a 1000 lines line it's very quick.

    Jer

  6. #6
    Join Date
    Jun 2012
    Posts
    5,534

    Default

    Here another approach
    Attached Files Attached Files
    So long, and thanks for all the fish.

  7. #7
    Join Date
    Sep 2012
    Posts
    19

    Default

    Thx Marabu. Excellent "repeat=Y" use (For the others who will need this post, to avoid the 10 minutes of "wonderful how it works").
    I will bench them but it appears to me more efficient without the "Join row" Step.

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.