Hi, I want to load organizationalUnit from a database (flat store) into hierarchical ou in a LDAP server. Each node (in db) contains the name, code and parent code of the ou. I used tOracleInput whith the sql query to get all nodes. I organized the query to get the tree (parent first, then children). To store node A, I need to know where is located the parent. So I need the parent's dn to build the dn of node A. I tried to use the tLDAPInput to get the dn of the parent ou as a lookup of my tMap. But the filter seems to be static? 1. Is there a way to do a lookup from the Oracle's row using the parent's ou ? 2. Can I use in a tJava, the jndi connection of tLDAPInput to execute the query ? ThX fo your help
Why is it not possible to use an Iterate link between a tOracleInput and tLDAPInput ? It could solve my pb of lookup reference in a ldap directory. ThX
Every time I add tLDAPInput, I got an error :
Exception in thread "main" java.lang.Error: Unresolved compilation problems:
Syntax error, insert "Finally" to complete TryStatement
Syntax error, insert "}" to complete Block
at talenddemosjava.test_0_1.test.tLDAPInput_1Process(test.java:207)
at talenddemosjava.test_0_1.test.runJobInTOS(test.java:332)
at talenddemosjava.test_0_1.test.main(test.java:248)
Ooops. Sorry, I am new on TOS and I made mistakes. The above errors disappear if I link it to aonther component, a tLogRow for instance. Still working on getting an LDAP request on Iterate.
I've succeed in my Job ! But I am not sure, it's state of the art.
As I want to do LDAP sub query for each row found in db in order to fetch parent DN, I used a tJavaFlex with the source code of tLDAPInput.
Begin: contains JNDI connection initialization
Main: sub query getting the DN of existing OU
End: close the JNDI connection
This approach has a main default : reuse is not easy.
- Do I have missed a key feature in TOS ?
- How will you implement fetch or check complementary information in another referential ?
Say you have a db row with information: name|address|zipcode|jobTitleCode. And you have referential contained in LDAP Directory: zipcode associated cities, job title code with job title description. The goal is to load a person in LDAP branch: name|address|zipcode|city|jobTitleDescription. And if JobTitleDescription does not exist, reject the db row
TOS is still a great product.
BTW: as a senior developper in Java, do you think write or modify existing LDAP component is easy, heavy ou hard ?