Configuring the components - 7.3

tFileExist

Version
7.3
Language
English
Product
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
Module
Talend Studio
Content
Data Governance > Third-party systems > File components (Integration) > File management components > tFileExist
Data Quality and Preparation > Third-party systems > File components (Integration) > File management components > tFileExist
Design and Development > Third-party systems > File components (Integration) > File management components > tFileExist
Last publication date
2024-02-21

Procedure

  1. In the design workspace, select tFileExist and click the Component tab to define its basic settings.
  2. In the File name field, enter the file path or browse to the file you want to check if it exists or not.
  3. In the design workspace, select tFileInputDelimited and click the Component tab to define its basic settings.
  4. Browse to the input file you want to read to fill out the File Name field.
    Warning:

    If the path of the file contains some accented characters, you will get an error message when executing your Job.

  5. Set the row and field separators in their corresponding fields.
  6. Set the header, footer and number of processed rows as needed. In this scenario, there is one header in our table.
  7. Set Schema to Built-in and click the Edit schema button to define the data to pass on to the tFileOutputDelimited component. Define the data present in the file to read, file2 in this scenario.
    For more information about schema types, see Talend Studio User Guide.
    The schema in file2 consists of five columns: Num, Ref, Price, Quant, and tax.
  8. In the design workspace, select the tFileOutputDelimited component.
  9. Click the Component tab to define the basic settings of tFileOutputDelimited.
  10. Set property type to Built-in.
  11. In the File name field, press Ctrl+Space to access the variable list and select the global variable FILENAME.
  12. Set the row and field separators in their corresponding fields.
  13. Select the Include Header check box as file2 in this scenario includes a header.
  14. Set Schema to Built-in and click Sync columns to synchronize the output file schema (file1) with the input file schema (file2).
  15. In the design workspace, select the tMsgBox component.
  16. Click the Component tab to define the basic settings of tMsgBox.
  17. Click the If link to display its properties in the Basic settings view.
  18. In the Condition panel, press Ctrl+Space to access the variable list and select the global variable EXISTS. Type an exclamation mark before the variable to negate the meaning of the variable.