Hitachi Vantara Pentaho Community Forums
Results 1 to 6 of 6

Thread: Stream Lookup - Not Getting Results

  1. #1

    Default Stream Lookup - Not Getting Results

    I'm trying to add a description field and am not getting any results. I don't quite know how to "dig" in this tool yet. Can someone assist?

    I've got this running:


    And it runs with this output:



    So it looks like it's working, but it doesn't find anything in the lookup.

    In the javascript, I'm breaking-up the one field into 3:




    Then using those later.

    See next post

    --Dale--

  2. #2

    Default

    Meanwhile, I'm pulling a set of lookup values from two tables using some SQL:

    And that works, as proven by the test:


    (see U0187403 has a description)

    See next post (this 4 image limiatation is a crock)

    --Dale--

  3. #3

    Default

    So here's the Stream Lookup:



    Right now I have "everything" in the output file:



    But in the output, 5, 6, and 7 are empty, and everything comes back with the default for "NAME1".



    So what am I doing wrong? I went through quite a few trials to get it to work without bombing. I had many tries with higher qualifications on the tables (ie IND_CURRENT_CUSTOMER_DIM.BILL_TO instead of just BILL_TO), but nothing passed muster until I got it the way it is shown.

    --Dale--

  4. #4
    DEinspanjer Guest

    Default

    Hard to tell exactly, but here is one thing that would be worth checking:
    Right click on the steps and select Show Input/Output Fields. I have a suspicion that the Stream Lookup step might be having trouble comparing the BILL_TO and DIVISION fields because they are numbers in the Table input stream but strings in the Javascript step.

  5. #5

    Default

    Quote Originally Posted by DEinspanjer View Post
    Hard to tell exactly, but here is one thing that would be worth checking:
    Right click on the steps and select Show Input/Output Fields. I have a suspicion that the Stream Lookup step might be having trouble comparing the BILL_TO and DIVISION fields because they are numbers in the Table input stream but strings in the Javascript step.
    Thanks for the suggestion. Good point, and I will consider that next time.

    I actually had another idea, and got rid of the Javascript all together. I did this by changing the SQL:

    Code:
    select distinct 
      icd.I2_COMPANY_PREFIX||iccd.BILL_TO||iccd.DIVISION CustDiv, 
      nvl(iccd.NAME1,'MISSING_DATA') Description
    from 
      IND_CURRENT_CUSTOMER_DIM iccd, 
      IND_COMPANY_DIM icd 
    where 
      SHIP_TO = '0000' 
    and 
      icd.COMPANY_NO = iccd.COMPANY_NO
    --Dale--

  6. #6
    DEinspanjer Guest

    Default

    Absolutely, joins inside the DB are always going to be much better for you than having to do a join or lookup inside Kettle.

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.