Component-specific settings - 6.5

Talend Job Script Reference Guide

author
Talend Documentation Team
EnrichVersion
6.5
EnrichProdName
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
task
Design and Development > Designing Jobs
EnrichPlatform
Talend CommandLine
Talend Studio

The following table describes the Job script functions and parameters that you can define in the setSettings {} function of the component.

Function/parameter Description Mandatory?

FILENAME

Use this parameter to specify the path and name of the source file, or a data stream that represents the source file.

A data stream is implemented via a variable pre-defined in your Studio or provided by the context or certain components you are using along with this component, such as tFileList, tJava, or tJavaFlex.

Yes

CSV_OPTION

Set this parameter to true to include CSV specific parameters such as ESCAPE_CHAR char and TEXT_ENCLOSURE.

By default, this parameter is set to false.

No

ESCAPE_CHAR

Use this parameter to specify the escape character to escape metacharacters if the specified file is a standard CSV file.

This parameter works only when the CSV_OPTION parameter is set to true.

No

TEXT_ENCLOSURE

Use this parameter to specify the text enclosure if the specified file is a standard CSV file.

This parameter works only when the CSV_OPTION parameter is set to true.

No

CSVROWSEPARATOR

Use this parameter to specify the CSV specific row separator.

This parameter works only when the CSV_OPTION parameter is set to true.

No

ROWSEPARATOR

Use this parameter to specify the separator used to identify the end of a row.

No

FIELDSEPARATOR

Use this parameter to specify a character, string or regular expression to separate fields for the transferred data.

No

HEADER

Use this parameter to specify the number of rows to be skipped in the beginning of file.

No

FOOTER

Use this parameter to specify the number of rows to be skipped at the end of the file.

No

LIMIT

Use this parameter to specify the maximum number of rows to be processed. If set to 0, no rows will be read or processed.

No

REMOVE_EMPTY_ROW

Set this parameter to true to skip any empty rows.

By default, this parameter is set to true.

No

UNCOMPRESS

Set this parameter to true to uncompress the input file if it's a zipped file.

By default, this parameter is set to false.

No

DIE_ON_ERROR

Set this parameter to true to stop the execution of the Job when an error occurs.

To catch a FileNotFoundException error, you also need to set this parameter to true.

Set this parameter to false to skip any rows on error and complete the process for error-free rows. When errors are skipped, you can collect the rows on error using a Row > Reject connection.

By default, this parameter is set to false.

No

ADVANCED_SEPARATOR

Set this parameter to true to change the thousands and decimal separators used for numbers. By default, the thousands separator is a comma (,) and the decimal separator is a period (.).

By default, this parameter is set to false.

No

THOUSANDS_SEPARATOR

Use this parameter to specify the thousands separator.

This parameter works only when the ADVANCED_SEPARATOR parameter is set to true.

No

DECIMAL_SEPARATOR

Use this parameter to specify the decimal separator.

This parameter works only when the ADVANCED_SEPARATOR parameter is set to true.

No

RANDOM

Set this parameter to true to allow extraction of lines randomly.

By default, this parameter is set to false.

No

NB_RANDOM

Use this parameter to specify the number of lines to be extracted randomly.

This parameters works only when the NB_RANDOM parameter is set to true.

No

TRIMALL

Set this parameter to true to remove the leading and trailing whitespaces from all columns.

By default, this parameter is set to false.

No

TRIMSELECT {}

This function lets you specify particular columns to trim using the SCHEMA_COLUMN and TRIM parameters.

  • SCHEMA_COLUMN: Use this parameter to specify a schema column.

  • TRIM: Set this parameter to true to trim the specified column.

Note that you need to list each schema column using the SCHEMA_COLUMN parameter. For columns you don't want to trim, do without the TRIM parameter or set it to false.

The settings of this function are meaningful only the TRIMALL paramter isn't present or is set to false.

No

CHECK_FIELDS_NUM

Set this parameter to true to check whether the total number of columns in each row is consistent with the schema. If not consistent, an error message will be displayed on the console.

By default, this parameter is set to false.

No

CHECK_DATE

Set this parameter to true to check the date format strictly against the input schema.

By default, this parameter is set to false.

No

ENCODING

Use this parameter to specify the encoding of the file.

The default value is \"ISO-8859-15\".

No

ENCODING:ENCODING_TYPE

Set this parameter according to the ENCODING value:

  • ISO-8859-15 if the ENCODING value is \"ISO-8859-15\".
  • UTF-8 if the ENCODING value is \"UTF-8\".
  • CUSTOM if ENCODING has another value.

The default value is ISO-8859-15.

No

SPLITRECORD

Set this parameter to true to split rows before splitting fields.

By default, this parameter is set to false.

No

ENABLE_DECODE

Set this parameter to true if any of your numeric types (long, integer, short, or byte type), will be parsed from a hexadecimal or octal string.

By default, this parameter is set to false.

No

DECODE_COLS {}

Use this function to provide pairs of the following parameters, which are meaningful only the ENABLE_DECODE parameter is set to true:

  • SCHEMA_COLUMN: Use this parameter to specify the column whose input string is to be parsed.

    This parameter works only when the DECODE parameter following it is set to true.

  • DECODE: Set this parameter to true to transform the input string of the specified column to the type defined in the schema.

No

TSTATCATCHER_STATS

Set this parameter to true to gather the processing metadata at the Job level as well as at each component level.

By default, this parameter is set to false.

No

LABEL

Use this parameter to specify a text label for the component.

No