Hitachi Vantara Pentaho Community Forums
Results 1 to 3 of 3

Thread: Why is sort rows element setting some properties to null?

  1. #1
    Join Date
    May 2014
    Posts
    5

    Default Why is sort rows element setting some properties to null?

    Hi,
    I am learning Pentaho and it is great!
    My transformation has 2 Table Input which are merged, the merge result is then sorted.
    My merged entries have a structure like this:
    <prop1>;<prop2><prop3>;<prop4>;<prop5>;<prop6>

    Props 1 to 3 come from one table and 4-6 come from the second one.
    The output of the merge is sent to a TextFile output, so I can verify that the merge is done correctly.

    Only I sort them using prop4 Ascending, I output to a text file but only the props 1 to 3 are populated. The others are null.

    Why is this happening? How can I troubleshoot this?

    thanks!

  2. #2
    Join Date
    May 2014
    Posts
    5

    Default

    I changed the merge element Join Type from LEFT OUTER to INNER and it works. I know the difference between left outer and inner, but once the output of the merge has a full row, the sort row element shouldn't erase a part of it, right?

  3. #3
    Join Date
    Nov 2008
    Posts
    271

    Default

    Sort step does not filter any row, so it is not eating in your stream. I see from your message that you are sorting after the merge step. Probably this comes from your business logic, but be aware that the two streams entering a merge step must be sorted on the fields to join.

    Finally, use merge step as a last resort. It has an awful effect on trans performance. When possible, join tables on db (in a table input, for instance).
    Andrea Torre
    twitter: @andtorg

    join the community on ##pentaho - a freenode irc channel

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.