# Defining a temporary folder parameter

Available in...

* Cloud API Services Platform
* Cloud Big Data
* Cloud Big Data Platform
* Cloud Data Fabric
* Cloud Data Integration
* Cloud Data Management Platform
* Data Fabric
* Qlik Talend Cloud Enterprise Edition
* Qlik Talend Cloud Premium Edition

You can design your artifact in Talend Studio to allow the use of a temporary folder during task execution in Talend Management Console.

## Before you begin

* You have set a Talend Cloud license in Talend Studio.

## About this task

Use this context parameter if a temporary folder is needed during the execution of the task in Talend 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.

## Procedure

1. Create a artifact with tFixedFlowInput components to generate two columns and two data rows, and use tFileOutputRaw components to write the data into two files.

   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
   ### Example

   ![Basic settings view.](https://help.qlik.com/talend/en-US/studio-user-guide/Resources/images/use_case-temp_folder1.png)
2. Drop three tJobLog components from the palette to the design workspace.
3. Link the first tJobLog to the first tFixedFlowInput with an OnSubjobOk link.

   Define the log message in tJobLog: "Working Folder is: " + context.resource\_flow\_temp\_folder.
   ### Example

   ![Basic settings view.](https://help.qlik.com/talend/en-US/studio-user-guide/Resources/images/use_case-temp_folder.png)
4. Link the second and third tJobLog components to the tFileOutputRaw components with OnComponentOk links.

   Define the log messages: "Wrote file: " + ((String)globalMap.get("tFileOutputRaw\_1\_FILENAME\_PATH")) and "Wrote File: " + ((String)globalMap.get("tFileOutputRaw\_2\_FILENAME\_PATH")).
5. Click the [+] button in the Context view and add three lines to the table.

   If this tab is not visible in Talend Studio, click Show view &gt; Talend , and select Context.
   ### Example

   ![Context view.](https://help.qlik.com/talend/en-US/studio-user-guide/Resources/images/use_case-temp_folder2.png)
6. Define the context parameters, all in lower case:
   1. For the temporary file, follow the pattern resource\_flow\_temp\_folder.
   2. Set the type of the parameter to String for this example, and set the path to the temporary folder in the Value field.

      You can set the parameter type to File or Directory according to your needs.
   3. For the files to be created, follow the pattern: parameter\_&lt;parameter\_name&gt;.
7. Run the artifact in Talend Studio to test it.

   The temporary folder is created with the two files in the directory you specified.
8. Right-click the artifact in the Repository tree view and select Publish to Cloud.
9. Click Open Job Task when prompted.
10. After setting the parameters, execute the artifact in Talend Management Console.
11. Review the log messages generated by the tJobLog components.
    ### Example

    ![Task execution logs in Talend Management Console.](https://help.qlik.com/talend/en-US/studio-user-guide/Resources/images/use_case-temp_folder3.png)

    The log messages show that a temporary folder was created during task execution.