Deletion with SharePointList Destination

Jun 2, 2009 at 8:21 PM

Is it possible deleting all the items of a list with the SharePointList destination? If yes, how?

If no, could it be an enhancement for this component? Thanks

Jun 10, 2009 at 2:44 PM

I know this may sound primitive but these are the steps that I took to delete all items from a SharePoint list

I previously created a table, TempSharPointDeleteID, that has 1 column called ID (int, null)

  1. Execute a SQL task that TRUNCATES the above table.
  2. Use a Data Flow task to load the ID column from the List into the above table.
  3. Use a Data Flow task with the above table as a source ant the SharePoint List Destination (BatchType=Deletion) as the destination.

You now should have an empty list. Note: You should play with the BatchSize property to improve performance.

I agree that this should be a future enhancement along with some others like Creating, Altering and Dropping lists (perhaps a Control Flow Item along the lines of the SQL or File System Task)

Jun 11, 2009 at 12:11 PM

I generally use a similar method to clean a list or an item sets, but I hope if it is possible to delete all items or an item group

without before reading the related Ids.

Jun 22, 2009 at 8:33 PM

I'm not sure I follow the SQL part of this, you can just create a source adapter which reads the rows and in the advanced properties, just check that the ID column is the only one coming out of SharePoint. Then attach it to the update flow to delete and it will go through and remove everything.

If you want more specifics, you can use the CAML query syntax to specify the items of a where clause, or 'group' to delete.  


Jun 23, 2009 at 8:04 AM

Ok. You say to read before the entire list with a source task and then delete directly all list items with a destination task

without using a SQL intermediate table. It could be an interesting solution, but with two tasks. Using a CAML query allows

to select which items deleting.

Jun 23, 2009 at 2:44 PM

You would need one dataflow task, and a source and a destination adapter hooked up to eachother.