Using SSIS to write to SharePoint

Using SSIS to write to SharePoint

Using SSIS to write to SharePoint 150 150 Carlos L Chacon

I was experimenting with the new (to me) SharePoint Source and Destination utilities available in SSIS and came across this error

Error: 0x0 at Data Flow Task, SharePoint List Destination: Error on row ID=”2″: 0x81020016 – List item referred to in the request does not exist.

What I was trying to do was write a result set to a SharePoint List.  What I didn’t realize, was in the column mapping if you want to INSERT a row into Sharepoint you can’t map the ID column, you have to let SharePoint assign that itself.  It is when you update that you map the SharePoint ID column.

This example will all the Records in my source table to be inserted into a list.  If I wanted to update a record, I map the ID column and all the columns that I map would update with the source data.

Column Mapping to SharePoint ListWhat is a little weird is that if you want to keep the source table and the SharePoint list in synch, the ID columns have to match up or when you update the record, the source table will override what is in the SharePoint list.  For my solution, it was not a big deal, but I could see it biting me one day.

Imagine what’s possible with a dedicated SQL specialist on your team.

Leave a Reply

Back to top