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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
imholzj
Contributor III
Contributor III

Joblet execution order (prejob)

I'm trying to write a simple Joblet that does an lDAP search. The input (userids) and output (DN's). Seems like it would be best to create an LDAP connection before processing the INPUT but how?

  1. If I put a preJob in the joblet to create the LDAP connection, I get a warning (already another preJob in the main job,) but it works.
  2. If I don't put a prejob, the LDAP search fails (because it doesn't have a predefined connection)
  3. Is it possible to get the LDAP connection to execute before the INPUT_1 starts processing? (OnComponentOK doesn't want to connect to INPUT_1)
  4. or if it has to be another job (and use tRunJob to call it) can the userids be streamed in like the Joblet?

jji

0695b00000JQ9TyAAL.jpg

Labels (2)
3 Replies
gjeremy1617088143

Hi , maybe you can use in the joblet after tFlowtoIterate -->iterate link --> LDAPconn -->on component ok --> LDAP Search-->row1 link etc

in the main job you put an LDAP connection in the prejob and you fill all the values and you check use the shared connection option and set the value with the name you want.

in the joblet you fill nothing on the LDAPconn just the shared connection option field with the same value as the one on the main job

so the joblet will reuse the connection of the main job.

Send me love and kudos

gjeremy1617088143

also maybe you can use this article :

https://community.talend.com/s/article/How-to-share-a-database-connection-between-a-Job-and-a-Joblet-ppQSJ

and do a similar thing with the ldap_conn name of the main job in the TLDAPInput component

imholzj
Contributor III
Contributor III
Author

I found a solution. First component is to save the flow to a file, then I can establish an LDAP connection and do anything else before processing the input.

 

jji