I'm using the script compoent to get some templates from a web serivce, and I would like to store them in a database. For an inital import I can use the script task as a source and then just pass it to a ole db destination.
But what if I want to create new and or update (potentially delete) templates in the database? It could be that I have a two records in the database, but there is 5 (including the 2) returned by the web service. I can use the script component to create 3 new
and check for changes for the existing two, but then again I could just remove SSIS as it can all be solved with code.
I have a couple of suggestions for myself, but I don't know how they would fit into the new world of SSIS:
First option as displayed in the image:
OLE DB Source -> Input to script transformation task -> do some magic and insert new rows, and update if needed -> Output to OLE DB Destination Update or OLE DB Destination NewRows
For this I can't seem to figure out the part about SynchronousInputID and ExclusionGroup.
The other option is:
Script task source to get all templates -> Do magic in code to produce output rows -> Output to OLE DB Destination Update or OLE DB Destination NewRows
For this I'll have to connect to the database in code to get the existing templates. I would like to use SSIS componenets as much as possible.
There is probably no right answer, but one of the two options preferred, or are there other ways that this can be solved? Any SSIS tricks or coding tips on how to do this would be helpful.