"An item with the same key has already been added. (Microsoft Visual Studio)" in SSIS on "merge join" task

  • Hi,

    Hope I'm in the right forum here. I have created a "merge join" inside a SSIS project and have 2 inputs going into it. When I edit the join and get the "Merge Join Transformation Editor" and set up the join and click save I get the error message: "An item with the same key has already been added"

    I'm not sure if this is a visual studio error message or an SSIS error message with this specific task. It's only occuring when I attempt to save the merge join after I edit it. I defined just 1 join of type "inner" between 2 columns and the error throws. This is a bit of a blocker tbh.

    Project builds successfully. I have switched on/off VS and reopened the project. Can anyone please help? Any suggestions/comments/hints/experiences much appreciated...

    Thanks,

    J.

  • Just for the record - I got a bit of a result on this. I used a task of type "Merge" and it seems to work. That is I got rid of the "merge join" task as I simply could not get it work work. I checked over everything and the .csproj files etc for 2 entries. Clean & rebuild etc but no success.

    As Error message is quite generic and specific to this task I'm now thinking it _could_ be a bug with the API possibly. My VS version is: 12.0.21005.1 REL

    Anyway I have a workaround.

    J.

  • Came across this today and there is no help to be found.  Found out a workaround.
    I am loading data from a CSV (multiple rows), selecting key items, manipulating them, and then writing a single row out to a table.  I therefore needed to merge the different data streams into one row.
    Merge Join requires data to have a PK and be sorted.  So immediately after the CSV file source I added a fake PK column (Derived Column) with a value of 1 and Sorted it (allowing duplicates), and after detecting the data I wanted into two streams tried a merge join  - but got this error.
    Solution: I had a part answer on first attempt.  Remove the PK add column and sort tasks from after the CSV source and add into each of the two streams, see attached image.

Viewing 3 posts - 1 through 2 (of 2 total)

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