Six Stars

Difference between the tLDAPInput and the tLDAPAttributesInput

About this subject, I found this 2012 topic: https://www.talendforge.org/forum/viewtopic.php?id=22602

Today, almost 6 years later, I have the answer to share. :-)

 

The difference is not clearly documented, but these components do basically the same thing. The only difference is that tLDAPAttributesInput generated code defines three new attributes in addition to the ones read from LDAP:

  • mandatoryAttributes: list of mandatory attributes to these classes

  • optionalAttributes: list of optional attributes to these classes

  • objectAttributes: list of attributes that are essential for the analysed object.

Attributes names are case-sensitive. You have to manually add them to your component schema.

 

The "Class Definition Root" parameter is a LDAP thing: https://docs.oracle.com/javase/jndi/tutorial/ldap/schema/object.html.

It means "what is the root object that I should query to find attribute information?". In most situations it is "ClassDefinition/", so just leave it as it is.

 

One may say: "But this is documented, check it out: https://help.talend.com/reader/keNgJGpTPemZtK8vsdDBrA/8xoNbnSKdhYZuWuW_~z3jA

 

And I answer: It isn't.

First, these attributes are all case-sensitive (the documentation states them in lower case). So you should include them in the schema with the uppercase middle 'A' in 'mandatoryAttributes', otherwise they don't work.

Second, even this being only a typo, nowhere in the documentation states this is the only difference between these components and there is no usage example of this component. I had to check the generated code to find out the differences.

 

Another important thing to cite is that Talend tLDAP-* built-in components use JNDI/LDAP Service Provider to connect to LDAP Server. Refer to https://docs.oracle.com/javase/8/docs/technotes/guides/jndi/jndi-ldap.html when looking for errors.

1 REPLY
Moderator

Re: Difference between the tLDAPInput and the tLDAPAttributesInput

Hello,

Thanks for sharing your practices and related links on forum.

Best regards

Sabrina

--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.