Sunday, February 14, 2016

How to use Import Column in SSIS

Import Column transformations do the work of translating physical files from system file storage paths into database blob-type fields, and Export Column transformations do vice versa.
Create a storage location for the image files
Keep three images as shown below
Create a text file something similar to this:
Design package something similar to below image

Open the Advanced Editor for the Import Column Transformation and click the Input Columns tab.
The Input Columns collection has a column named ImageFilePath, but there are no output columns.



Add an output column by clicking the Output Columns folder icon and click the Add Column button. Name the column myImage. Notice that the DataType property is [DT_IMAGE] by default. That is because this transformation produces image outputs.


Get the LineageId from myImage column, in here it is 180 and map this to FileDataColumnID for input column ImageFilePath as shown below.


Load data to SQL Server table, which we already created. The imported data would be something similar to as shown below.


Cheers!
Uma

1 comment:

  1. I feel SSIS is the best way of providing more useful information and finding more useful resources and aspects there to help solve complex IT operations.

    SSIS Postgresql Read

    ReplyDelete