Step 2: Setting the command to enable the output stream feature
Now we will make use of tJava to set the
command for creating an output file and a directory that contains the output file.
Procedure
Drop a tJava component onto the
design workspace, and double-click it to open the Basic
settings view to set its properties.
Fill in the Code area with the
following command:
new java.io.File("C:/myFolder").mkdirs();
globalMap.put("out_file",new java.io.FileOutputStream("C:/myFolder/customerselection.txt",false));
Information noteNote:
The command we typed in this step will create a new directory
C:/myFolder for saving the output file
customerselection.txt. You can customize the
command in accordance with actual practice.
Connect tJava to tFileInputDelimited using a Trigger > On Subjob Ok connection.
This will trigger the subjob that starts with tFileInputDelimited when tJava succeeds in running.
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 – please let us know!