I’m currently creating an SSIS job that will pull picture data from a SQL database and write each picture to a file. We have an ID system that stores all images taken of staff directly to database fields, but we’re going to be moving to a new system that stores all of the images as files in paths by User ID.
I have already created my main data flow that gets all of the users and the proper path, but I’m having trouble writing the script component that will create the images. I have the image data as a string, but how do I get it to go out to a file at the proper path?
This is what I currently have:
Public Overrides Sub Input0_ProcessInputRow(ByVal Row As Input0Buffer)
Dim filesys, folder
filesys = CreateObject("Scripting.FileSystemObject")
If Not filesys.FolderExists("E:\\test\\" + Row.Folder) Then
folder = filesys.CreateFolder("E:\\test\\" + Row.Folder)
End If
End Sub
The final path I’m looking for is: “E:\test\” + Row.Folder + “\” + Row.CardholderID + “.jpg”. This will change to include another folder needed by the program we are using.
I’m not really attached, so either vb.net or c# (ssis 2008) are fine by me, as I don’t know either enough to have a preference.
Thanks for any help.
Is there a reason you are rolling your own solution versus using the built-in functionality of the Export Column Transformation
Examples