Table of Contents

Search

  1. Preface
  2. Mappings
  3. Mapplets
  4. Mapping Parameters
  5. Mapping Outputs
  6. Generate a Mapping from an SQL Query
  7. Dynamic Mappings
  8. How to Develop and Run a Dynamic Mapping
  9. Dynamic Mapping Use Cases
  10. Mapping Administration
  11. Export to PowerCenter
  12. Import From PowerCenter
  13. Performance Tuning
  14. Pushdown Optimization
  15. Partitioned Mappings
  16. Developer Tool Naming Conventions

Developer Mapping Guide

Developer Mapping Guide

Maintain a Stable Sort

Maintain a Stable Sort

When you maintain order in a partitioned mapping, the Data Integration Service does not perform a stable sort. The Data Integration Service maintains the order of the rows based on the sort key. However, if multiple rows have equal values for the sort key, the rows might not appear in the same relative order in the output as they appear in the input.
For example, a mapping enabled for partitioning reads from a sorted flat file source that contains the following data:
Order_ID,Item_ID,Item,Quantity,Price 45,000468,ItemD,5,0.56 45,123456,ItemA,5,3.04 41,456789,ItemB,2,12.02 43,123456,ItemA,3,3.04
The mapping includes a Sorter transformation that specifies Order_ID as the sort key with the direction as descending. When the Data Integration Service uses multiple threads to run the Sorter transformation, it might not maintain the relative order of the rows with the same value for Order_ID. For example, the service might write the rows to a merged target file in the following order:
Order_ID,Item_ID,Item,Quantity,Price 45,123456,ItemA,5,3.04 45,000468,ItemD,5,0.56 43,123456,ItemA,3,3.04 41,456789,ItemB,2,12.02
To maintain a stable sort, disable partitioning for the mapping by setting the
Maximum Parallelism
run-time property for the mapping to 1.

0 COMMENTS

We’d like to hear from you!