Hitachi Vantara Pentaho Community Forums
Results 1 to 1 of 1

Thread: Merging delimited text files with maximum value found

  1. #1
    Join Date
    Nov 2016

    Default Merging delimited text files with maximum value found


    I am trying to merge multiple text files using the maximum value found at a particular row & column

    All the text files have exactly the same number of rows and columns, as per the below image and attached sample data
    The twa column always has values from 0-180 in increments of 5 degrees

    Name:  polar values.jpg
Views: 4646
Size:  37.8 KB

    Say for example:
    • the values of all the tws columns are initially zero
    • the first text file has values as shown in the attached image
    • if a subsequent text file has a value at a particular row/column that is greater than the previous value, update it.
      So say a subsequent text file has a value of 5 in the tws14 column, twa=40 row, then update it (yellow highlight would become 5)
    • if a subsequent text file had a lower value (say 3) in this position, then nothing would change

    I have tried writing the data to a database various and using lookups/filters, database update queries etc etc, without success.
    The end goal is to write a text file in the same format as the originals- which I am ok doing if I have the data in a suitable form (say a database table)

    I think that there is probably a simpler way to achieve this than my efforts- so if someone can point me in the right direction, I would appreciate it

    thank you in advance

    Attached Files Attached Files

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.