Skip to main content

Using data mapping specifications in custom code components like tJavaRow

Talend Data Integration components like tJava or tJavaRow allows you to write custom code to implement a choice of logic. This custom code could either break lineage or produce everything-to-everything dependencies (Cartesian product) in Talend Data Catalog. To avoid such consequences, it is recommended to create data mapping specifications in the Documentation tab of the component.

If the data mappings are not included, there could be different results depending on the custom code, either lineage could break or a Cartesian product of mappings could form. The image below depicts the possible scenarios in case of missing mapping specifications.

Here is a sample Job that uses tJavaRow for a simple conditional check of quantity ordered by a customer.

Without mappings defined, this Job results in a Cartesian product which results in a lineage break in turn.

You can add the data mapping specification to the Documentation tab of the component.

This solves the lineage issue:

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – please let us know!