Merge transform and sort order

What effect has the Merge transform on the order of the records? Suppose I merge data from two sorted sources A and B, will the output contain the records of source A in its original sorted order followed by B?

I have the strong impression that this isn’t the case, but that the records are ‘woven’ together.


lamanp :netherlands: (BOB member since 2008-09-02)

I would imagine that its going to stripe them at say 1000 records per source.

Its too bad the merge doesnt have a sortation option. Read one record from each source and pass through the largest/smallest. Save me from having to sort it immediately following the merge.


jlynn73 :us: (BOB member since 2009-10-27)

It now appears to be merged randomly. Running my dataflow multiple times causes a different order each time.


lamanp :netherlands: (BOB member since 2008-09-02)

Random order is what I would expect. Then again, I usually assume the worst hoping to be pleasantly surprised.


eganjp :us: (BOB member since 2007-09-12)

But what about the order of columns when using the MERGE transform? BODS does not respect identical columns when the order of the columns in the mapping are not the same.

Can anyone confirm this?
It is a shame when the target table is filled with mixed content because does not respect idential column names :wink:


TurningPointHolland :netherlands: (BOB member since 2006-09-06)

I always assumed that column names, datatype and order must be the same for all sources. At least that’s what I always ensure.


lamanp :netherlands: (BOB member since 2008-09-02)

An modern ETL tool should comfort you merging rows without thinking if the order of the columns is the same…Of course names should be the same!

This is thinking from the head of the user who is not always is a severe SQL specialist.
Could be added to the SAP Idea Place :wink:


TurningPointHolland :netherlands: (BOB member since 2006-09-06)