Example - 6.5

Talendジョブスクリプトリファレンス

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
ジョブデザインと開発 > ジョブデザイン
EnrichPlatform
Talend CommandLine
Talend Studio

The following example shows a parent Job in which a tRunJob component is configured to call dynamically one of two child Jobs named child_1 and child_2 respectively each time, based on a defined context variable named child. When the parent Job runs, a prompt message appears asking the user to enter the name of the child Job to be called.

DEFAULT_CONTEXT: Default,
ContextType {
	NAME: Default
	addContextParameter {
		NAME: child,
		TYPE: id_String,
		VALUE: "",
		PROMPT: "Specify the Job to run:",
		PROMPTNEEDED: true
	}
}
addComponent {
	setComponentDefinition {
		TYPE: "tRunJob",
		NAME: "tRunJob_1",
		POSITION: 256, 160
	}
	setSettings {
		USE_DYNAMIC_JOB : "true",
		CONTEXT_JOB : "context.child",
		PROCESS : "child_1;child_2",
		PROCESS:PROCESS_TYPE_PROCESS : "_YmHRUI78EeehN7VTh9zIVw;_dX3JEI78EeehN7VTh9zIVw"
	}
}