TunoN
TunoN

Reputation: 101

Both inputs of the transformation must contain at least one sorted column, and those columns must have matching metadata ssis

I have created an SSIS package and I used Merge Join to join a Dimension with the result of another Merge Join and I got the following error:

Both inputs of the transformation must contain at least one sorted column, and those columns must have matching metadata ssis

enter image description here

enter image description here

Upvotes: 1

Views: 17774

Answers (2)

TunoN
TunoN

Reputation: 101

I have found that the issue is related to the data type of the two sorted columns, I just made a conversion to make both of them "INT" and everything is going fine.

Upvotes: 6

EzLo
EzLo

Reputation: 14189

The message is pretty clear. SSIS merge operations required that the data to be compared is sorted so comparisons are faster.

Make sure that you are retrieving ordered data from your database using the ORDER BY clause (if on SQL), and mark the columns with their corresponding order at the property IsSorted.

If you can't have the data ordered at the source, you can add a Sort operation in SSIS which will sort the merging columns (before the actual merge). You will have to do this on both flows before the merge. Please be adviced that using this componene will block the data flow until all rows are sorted.

The Merge error message will go away once you join both data flows with sorted columns.

Upvotes: 1

Related Questions