Cloud API Services Platform
Cloud Big Data
Cloud Big Data Platform
Cloud Data Fabric
Cloud Data Integration
Cloud Data Management Platform
Before you begin
You have set a Talend Cloud license in the Studio.
About this task
Use this context parameter if a temporary folder is needed during the execution of the task in Talend Cloud Management Console. The temporary folder is created before the task is triggered and it is available to all actions in the task. The folder is deleted after the task is executed.
Create a artifact with tFixedFlowInput
components to generate two columns and two data rows, and use
tFileOutputRaw components to write the data into two
Use context variables to configure the components.
Define the files in the tFileOutputRaw components using the following pattern: context.resource_flow_temp_folder+"/"+context.parameter_one
- Drop three tJobLog components from the palette to the design workspace.
Link the first tJobLog to the first
tFixedFlowInput with an
Define the log message in tJobLog: "Working Folder is: " + context.resource_flow_temp_folder.
Link the second and third tJobLog components to the
tFileOutputRaw components with
Define the log messages: "Wrote file: " + ((String)globalMap.get("tFileOutputRaw_1_FILENAME_PATH")) and "Wrote File: " + ((String)globalMap.get("tFileOutputRaw_2_FILENAME_PATH")).
Click the [+] button at the bottom of the
Contexts view and add three lines to the table.
If this tab is not visible in Studio, click Contexts., and select
Define the context parameters, all in lower case:
- For the temporary file, follow the pattern resource_flow_temp_folder.
Set the type of the parameter to String for this
example, and set the path to the temporary folder in the
You can set the parameter type to File or Directory according to your needs.
- For the files to be created, follow the pattern: parameter_<parameter_name>.
Run the artifact in the Studio to test it.
The temporary folder is created with the two files in the directory you specified.
- Right-click the artifact in the Repository tree view and select Publish to Cloud.
- Click Open Job Task when prompted.
- After setting the parameters, execute the artifact in Talend Cloud Management Console.
Review the log messages generated by the tJobLog
ExampleThe log messages show that a temporary folder was created during task execution.