If your organization has the Partitioning license, you can use partitions to optimize performance for
mapping
tasks.
If a
mapping
task processes large data sets or includes transformations that perform complicated calculations, the task can take a long time to process. When you use multiple partitions, the
mapping
task divides data into partitions and processes the partitions concurrently, which can optimize performance. Not all source types support partitioning.
Enable partitioning when you configure the Source transformation in the Mapping Designer. When you configure partitions in the Source transformation, partitioning occurs throughout the mapping.
Each Source transformation across all data flows in the mapping must contain the same number of partitions.
To enable partitioning for a source, select a partitioning method on the
Partitions
tab. The partitioning methods that you can select vary based on the source type. For more information about partitioning different types of sources, see the help for the appropriate connector.
You can select one of the following partitioning methods based on the source type:
None
The
mapping
task processes all data in a single partition. This is the default option.
Fixed
The
mapping
task distributes rows of data based on the number of partitions that you specify. You can specify up to 64 partitions.
Use this method for a source type that does not allow key range partitioning such as a flat file source, or when the mapping includes a transformation that does not support key range partitioning.
Consider the number of records to be passed in the mapping to determine an appropriate number of partitions for the mapping. For a small number of records, partitioning might not be advantageous.
If the mapping includes multiple sources, specify the same number of partitions for each source.
Key range
The
mapping
task distributes rows of data based on a field that you define as a partition key. You select one field in the source as the partition key, and then you define a range of values for the partition key.
You can use this method for tabular sources such as relational, Google BigQuery, and JDBC V2 sources.
Key ranges can be of the following data types:
String
Any type of number data type. However, you cannot use decimals in key range values.
Date/time type. Use the following format:
MM/DD/YYYY HH24:MI:SS
If the mapping includes multiple sources, use the same number of key ranges for each source.
Pass through
The
mapping
task processes data without redistributing rows among partitions. All rows in a single partition stay in the partition. Choose pass-through partitioning when you want to create additional partitions to improve performance, but do not want to change the distribution of data across partitions.
You can use this method for sources such as Amazon S3, Netezza, and Teradata.
Dynamic
The
mapping
task determines the optimal number of partitions to create at runtime based on the source size.
You cannot partition a mapping in the following situations:
The mapping includes a Web Services or Hierarchy Parser transformation.
The mapping includes multiple sources that use custom relationships or advanced relationships.
The mapping is a mapping in SQL ELT mode.
When you configure partitions, be sure to save and run the mapping in the Mapping Designer to validate the partition settings.