Difference between IsSorted and Sort transformation

  • Hi Everyone,

    I have 2 data sources that get merged using a merge join. I set the IsSort property and SortKey on both data sources, but didn't get the correct number of records in an inner join. When I used the sort transformation I got the correct number of records in an inner join. So what's the difference between the both of them? Can I only do an IsSort when the data is sorted in the two sources?

    Thanks!

  • IsSort tell SSIS that a source is sorted eg: via order by or external program that generated a file.

    Sort transformation is performing sort.

    So if you tell SSIS that you have sorted the source and it isn't sorted, then this can cause the wrong result.

  • Thanks.

  • You need to take care of two things while using Merge Join in SSIS :

    1) Is Sorted is set to "True" and Sort Key is defined on the sort column

    2) The data set (in the source query) needs to be actually sorted on the Sort Key column above.

    Only then you will be able to get correct results.

    Hope this helps .. 🙂

  • It does. Thank you.

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply