Hitachi Vantara Pentaho Community Forums
Results 1 to 6 of 6

Thread: Cartesian Product with empty set... and Detect Empty Stream

  1. #1
    Join Date
    Mar 2009
    Posts
    137

    Default Cartesian Product with empty set... and Detect Empty Stream

    Hi everybody,

    first of all: I know that Matt does not like this Detect Empty Stream step, but I think I found some nice place to use it (but it does not work as expected ).

    To get to the point. I set up a transformation having one main data stream and another additional stream (which could be empty). I join those to streams using the Cartesian Product (cause every information of the additional stream has to be joined with the main data). But the problem is, if there are no additional information: In this case my main data gets "killed" cause the cartesian product of the main data and the empty set is empty (by definition - I know that ). So I had this idea to use "Detect Empty Stream" in front of the Cartesian Product Step at the additional information stream. It worked well, if the additional information is empty. But it doesn't work at all if the stream is not empty. I guess thats a bug with the "Detect Empty Stream" step? Or do I just use this step incorrect?

    Well I attached an example transformation. The Dummy step gets no data, if the limit of rows generated in "Additional Data (could be none)" is > 0, but it works as expeceted if the limit is set to 0.

    Any ideas?

    Thanks a lot!
    Attached Files Attached Files
    Last edited by Jogilein; 07-15-2009 at 03:38 AM.

  2. #2

    Default

    Hi,
    It's the normal behaviour of this step :-)
    I corrected the sample.

    Just keep in mind that this step will generate a row if the input stream is empty (just trigger a row, nothing more, nothing less).

    Take Care


    Samatar
    Last edited by shassan2; 06-04-2010 at 10:55 AM.
    Samatar

  3. #3
    Join Date
    Mar 2009
    Posts
    137

    Default

    Thanks a lot!

  4. #4
    Join Date
    Nov 1999
    Posts
    9,729

    Default

    I don't have a problem with any step actually. Whatever gets the job done is fine by me. ;-)

  5. #5

    Default

    I don't have a problem with any step actually. Whatever gets the job done is fine by me. ;-)

    --> Comment on dit déjà...hum..hum.. pragmatique.


    Samatar
    Samatar

  6. #6
    Join Date
    Nov 1999
    Posts
    9,729

    Default

    Pragmatism is underrated. If you're doing a project and you have a deadline to find a solution, it's pretty much all you have.

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.