lookup_Pentaho data Integration

512 views Asked by At

I have two files (App.csv and Acess.csv)

  1. App.csv has one column called Application
    Application
    App-A

    App-B

  2. Access.csv contains 3 columns (Application, entitlement, userid)

        Application, entitlement, userid
    
        App-A,ent-A,user1
        App-A,ent-B,user1
        App-B,ent-c,user2
        App-B,ent-d,user1
        App-C,ent-c,user2
        App-C,ent-d,user1   
    
  3. I need extract all the App-A and App-B details if it matches Application file column and output should like be below

        App-A,ent-A,user1                                                                                                                                                                                                                         
        App-A,ent-B,user1
        App-B,ent-c,user2
        App-B,ent-d,user1
    
  4. i tried using stream-lookup but it's only giving one row per App instead of all rows belongs to App-A and App-B

any help is appreciated

1

There are 1 answers

2
Ahmmed On BEST ANSWER

I have prepare a solution for you Here

I used user-define-java-class to compare the value.

  1. RunTrans.ktr: I take app.csv input from here and make data in one row.
  2. ForOnlyLoop.kjb: This is just for passing data to next transformation.
  3. CopmareAndResult.ktr: I take access.csv input from here and compare result, if value match then return row otherwise return nothing.

Please let me know if its ok with you.

Another Solution:- You can get same solution using ETL metadata Injection step from Here

  1. MetaData.ktr:- Take App.csv input and pass value to compare ktr.
  2. Compare.ktr: Take access.csv input and compare value with 'switch/case' step. I have provided switch- case comparison value from MataData.ktr step.