Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik and ServiceNow Partner to Bring Trusted Enterprise Context into AI-Powered Workflows. Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

tMap lookups a joblet

Hi folks,

 

I am new to talend. I have got a question regarding the tMap component and joblets. In order to devide (and conquere) our extraction jobs I have created some atomic joblets which deliver me the first source database objects for further transformations. Well, this part works very well!

 

The main question is now, whether I am able to use this predefined joblets for extraction as lookups within my tMap definition?

 

Lets make it more clear with a picture:

 

0683p000009Lvrl.png
A little bit explanation

  • The extraction joblets got some technical primary key as input (INPUT_1).
  • With these keys the joblet returns the raw database objects in order to manipulate and transform them to a sort of business objects (next process). 
  • The extraction joblet is responsible to provide the data --> encapsulation
  • The "Input_1" of the joblets are based on a generic schema which provides some attributes (also the technical key) to grep the record you need. I call it "param" (e.g. param.recid, param.key_1, param.key_2, ...)
  • The tOracleInput components apply predefined SQLs from my meta model. For instance:

0683p000009LugO.png

  • The "param" records references the INPUT_1 generic schema I have already mentioned

The mission:

  • How can I configure the tMap (or another mapping component) that way that it uses my extraction joblet instead an independent fetch logic (SQL) as lookup?
  • I should mention: I am a friend of "Don't Repeat Youself" what descripts best my motivation trying to do it that way 0683p000009MACn.png.

Additionals:

  • Something that might go in the right direction I could find in the talend referance guide.

I appreciate any help

 

Cheers

Adam L.

Labels (2)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

HI Shong

thanks for your post. I have tried to reconstruct my job as you desribed. I guess that there is another problem which I do not really understand.

 

Have a closer look at the child job implemented as advised:

 

0683p000009Lvd8.png

The tFixedFLowInput components set some dummy parameter. My log shows what I assumed to generate.

0683p000009Lvth.png

  1. We got from the jl_e_sk_fahrzeug_1 joblet our record identified by the tFlixedFlowInput_1 parameter. Check! Thats the second log entry.
  2. We also got a record of the jl_e_skp_firma_1 joblet. Perfactly. Thats the first log entry.

Now I dive into the tMap component. Any here it becomas a little miraculous!

 

0683p000009Lvnv.png

I got some compilation errors!:

 

0683p000009Lvtw.png

 

Any ideas? 

 

Cheers

Adam L.

 

 

 

 

View solution in original post

4 Replies
Anonymous
Not applicable
Author

Hello
You need to redesign the job as below so that you are able to access param value in the lookup flow.
main job:
tFixedFlowinput--main--tflowtoiterate--trunjob

trunjob: call the child job and pass the current values to child job.

child job:
tfixedflowinput-1-main--tjoblet1--tmap1--tlogrow
                                                      |
                                                 lookup
                                                     |
                              tfixedflowinput2-main-tjoblet2
tfixedflowinput1, tfixedflowinput2 generate the current values passed from main job.

Regards
Shong

Anonymous
Not applicable
Author

HI Shong

thanks for your post. I have tried to reconstruct my job as you desribed. I guess that there is another problem which I do not really understand.

 

Have a closer look at the child job implemented as advised:

 

0683p000009Lvd8.png

The tFixedFLowInput components set some dummy parameter. My log shows what I assumed to generate.

0683p000009Lvth.png

  1. We got from the jl_e_sk_fahrzeug_1 joblet our record identified by the tFlixedFlowInput_1 parameter. Check! Thats the second log entry.
  2. We also got a record of the jl_e_skp_firma_1 joblet. Perfactly. Thats the first log entry.

Now I dive into the tMap component. Any here it becomas a little miraculous!

 

0683p000009Lvnv.png

I got some compilation errors!:

 

0683p000009Lvtw.png

 

Any ideas? 

 

Cheers

Adam L.

 

 

 

 

Anonymous
Not applicable
Author

Ok got it!!! My mistake:

The problem were incompatible attribute types. I wanted to press an integer into a string type! That was the error. Now, everything seams to work.

BTW: Just for other newbies hovering the underlined fragments in the code tab brings me to the solution.

Thanks and best regards
Adam L.
Anonymous
Not applicable
Author

Great! Thanks for your feedback!