Configuring the tGroovyFile component - 7.0

Groovy

author
Talend Documentation Team
EnrichVersion
7.0
EnrichProdName
Talend Big Data
Talend Big Data Platform
Talend Data Fabric
Talend Data Integration
Talend Data Management Platform
Talend Data Services Platform
Talend ESB
Talend MDM Platform
Talend Open Studio for Big Data
Talend Open Studio for Data Integration
Talend Open Studio for ESB
Talend Open Studio for MDM
Talend Real-Time Big Data Platform
task
Data Governance > Third-party systems > Custom code components (Integration) > Groovy components
Data Quality and Preparation > Third-party systems > Custom code components (Integration) > Groovy components
Design and Development > Third-party systems > Custom code components (Integration) > Groovy components
EnrichPlatform
Talend Studio

Procedure

  1. Double-click the component to display the Component view.
  2. In the Groovy File field, enter the path to the file containing the Groovy code, or browse to the file in your directory. In this example, it is D:/Input/Ageducapitaine.txt, and the file contains the following Groovy codes:
    println("The captain is " + age +  " years old")
  3. In the Variables table, add a line by clicking the [+] button.
  4. In the Name column, enter "age", and then in the Value column, enter 50.