Skip to main content Skip to complementary content

Creating the temporary file

Procedure

  1. Double-click tCreateTemporaryFile to open its Basic settings view.
  2. Select the Remove file when execution is over check box to delete the created temporary file after the Job execution.
  3. Select the Use default temporary system directory check box to create the file in the default system temporary directory.
  4. In the Template field, enter the temporary file name which should contain the characters XXXX. In this example, it is talend_XXXX.
  5. In the Suffix field, enter the filename extension of the temporary file. In this example, it is dat.
  6. Double-click tJava to open its Basic settings view.
  7. In the Code field, enter the following code to display the default system temporary directory and the path to the temporary file that will be created on the console:
    System.out.println("The default system temporary directory is:\r" + (String)System.getProperty("java.io.tmpdir"));
    System.out.println("The path to the temporary file is:\r" + (String)globalMap.get("tCreateTemporaryFile_1_FILEPATH"));

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!