Skip to main content

Component-specific settings for tPartition

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?

NBPARTITIONS

Specify the number of partitions you want to split the input dataset up into.

The default value is 4.

No

PARTITION_KEY {}

Include in this function one or more sets of the following parameters to define the key or keys to be used for the partitioning.

  • SCHEMA_COLUMN: Specify a schema column.
  • KEY_ATTRIBUTE: Set this parameter to true to use the specified schema column as the key of the partitioning.

Yes

CUSTOMPARTITIONER

Set this parameter to true to use a Spark partitioner you need to import from outside Talend Studio. Then, you need to provide the following information:

  • PARTITIONER_FQCN: Enter the fully qualified class name of the partitioner to be imported.
  • PARTITIONER_JAR {}: Include in this function one or more JAR_NAME parameters to specify the jar file or files containing the specified class and its dependent jar files you need to import.

No

SORTINPARTITION

Set this parameter to true to sort the records within each partition. Then use the COMPARATOR parameter to define the type of sorting.

Acceptable values of the COMPARATOR parameter :

  • NATURALORDER: Sort keys in their natural order, for example, in the alphabetical order.
  • CUSTOMCOMPARATOR: Use a custom program to sort the keys. Then you need to use the COMPARATOR_FQCN parameter to specify the fully qualified class name of the comparator to be imported, and use the JAR_NAME parameter to add the jar files to be loaded.

No

LABEL

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

No

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!