Configuring the tJavaFlex component - Cloud - 8.0

Java custom code

Version
Cloud
8.0
Language
English
Product
Talend Big Data
Talend Big Data Platform
Talend Cloud
Talend Data Fabric
Talend Data Integration
Talend Data Management Platform
Talend Data Services Platform
Talend ESB
Talend MDM Platform
Talend Real-Time Big Data Platform
Module
Talend Studio
Content
Data Governance > Third-party systems > Custom code components (Integration) > Java custom code components
Data Quality and Preparation > Third-party systems > Custom code components (Integration) > Java custom code components
Design and Development > Third-party systems > Custom code components (Integration) > Java custom code components
Last publication date
2024-02-20

Procedure

  1. Double-click tJavaFlex to display its Basic settings view and define the components properties.
  2. Click Sync columns to make sure that the schema is correctly retrieved from the preceding component.
  3. In the Start code field, enter the following code:
    System.out.println("Content of file being transferred:\n");
  4. In the Main code field, enter the code to be applied on each line of data.
    In this example, we want to display the content of the source file based on the defined dynamic schema column:
    System.out.println(row1.dyna);
    Warning:

    In the Main code field, "row1" refers to the name of the link that connects to tJavaFlex. If you rename this link, you have to modify the code.

  5. In the End code field, enter the code that will be executed in the closing phase.
    In this example, the code indicates the end of the execution of tJavaFlex by displaying the "End of file" message:
    System.out.println("\nEnd of file");