Example - 6.5

Talend Job Script Reference Guide

author
Talend Documentation Team
EnrichVersion
6.5
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 Real-Time Big Data Platform
task
Design and Development > Designing Jobs
EnrichPlatform
Talend CommandLine
Talend Studio

In the following example, the tJava component will execute a piece of Java code to:

  • create a directory D:/myFolder.

  • define a global variable named output_file that represents the output stream target D:/myFolder/people.txt.

	setSettings {
		CODE : "new java.io.File(\"D:/myFolder\").mkdirs(); 
globalMap.put(\"output_file\",new java.io.FileOutputStream(\"D:/myFolder/people.txt\"));"
	}