Design > Partitions > Partitioning Examples
  

Partitioning Examples

The following examples show how you can configure partitioning in a mapping.

Partitioning with a Flat File Source

You have a Mapping Configuration task that uses a large, 1GB flat file source. You want to specify two partitions in the Source transformation to optimize performance.
On the Partitioning tab for the Source transformation, you enter the number of partitions, as shown in the following diagram:
The Number of Partitions field in the Partitioning tab shows that two partitions will be used when the Mapping Configuration task runs.

Key Range Partitioning with a Relational Database Source

You have customer names, addresses, and purchasing history in a relational database source. You decide to partition the source data into three partitions based on postal codes, using the following ranges:
On the Partitioning tab for the Source transformation, you select the BILLINGPOSTALCODE field for the key range. You add three key ranges to create three partitions, as shown in the following diagram:
The BILLINGPOSTALCODE is selected as the key range in the Key Range Column field. The Start and End columns for key ranges show three partitions based on the BILLINGPOSTALCODE field values.
Note that for the first partition, you leave the start value blank for the minimum value. In the last partition, you leave the end value blank for the maximum value.
Using these values, records with a postal code of 0 up to 30000 are processed in partition #1, records with a postal code of 30001 to 50000 are processed in partition #2, and records with a postal code of 50001 or higher are processed in partition #3.
After you configure the mapping, you save and run the mapping to validate the partitions.