Quantcast
Channel: SQL Server Integration Services forum
Viewing all articles
Browse latest Browse all 24688

Configuring "Export Column Transformation" in SSIS 2005/2008

$
0
0

Hi All,

I was trying to find out the use of "Export Column Transformation" in SSIS. I found few links but It did not give clear picture that How Configuring Export Column Transformation in SSIS.

Please follow below Steps:

Create Table:

GO
/****** Object:  Table [TEST].[TEST_SOURCE]    Script Date: 11/28/2012 13:34:24 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [TEST].[TEST_SOURCE](
 [EMP NAME] [varchar](100) NULL,
 [EMP ID] [int] NULL,
 [COMPANY NAME] [varchar](100) NULL,
 [CITY] [varchar](100) NULL,
 [COUNTRY] [varchar](100) NULL,
 [YEARLY INCOM] [int] NULL,
 [COMPANY_IMAGE] [varbinary](max) NULL,
 [FILE_PATH] [varchar](100) NULL
) ON [PRIMARY]

GO
SET ANSI_PADDING OFF

Insert Value into above table:

INSERT INTO TEST.TEST_SOURCE  VALUES ('Kumar',2345,'ABC','DELHI','INDIA',100000,NULL,'E:\COMPANY LOGO\ABC_LOGO_IMAGE.JPG')

Update the Column  [COMPANY_IMAGE] to Load Image into Table:

UPDATE TEST.TEST_SOURCE
SET [COMPANY_IMAGE] =(SELECT * FROM OPENROWSET(BULK N'E:\ABC_LOGO_IMAGE.JPG', SINGLE_BLOB) AS COMPANY_IMAGE)
WHERE [EMP ID]=2345

For Export Column Transformation, columns  

[COMPANY_IMAGE] [varbinary](max) NULL,
 [FILE_PATH] [varchar](100) NULL

are going to play Important Role.

Note: For File_Path column I definied [varchar](MAX) but I noticed that this column was not appearing under "File Path Column", It was appearing Under "Extract Column" in "Export Column Transformation" in SSIS.

Open Export Column Transformation-->Select Column [COMPANY_IMAGE] from drop down list under Extract Column-->Select Column [FILE_PATHfrom drop down list under File Path Column-->Check Force Truncate & click Ok.

Note: Only Those Columns will appear under DROP DOWN LIST of Extract Column  where "The data to be written must have a DT_TEXT, DT_NTEXT, or DT_IMAGE data type"

So For Above Example: The Export Column Transformation will Export the Data of Column COMPANY_IMAGE (Image:ABC_LOGO_IMAGE.JPG, which is Stored in table) & save it to path E:\COMPANY LOGO\ABC_LOGO_IMAGE.JPG which is specified under column FILE_PATH.

http://msdn.microsoft.com/en-us/library/ms139818.aspx

http://msdn.microsoft.com/en-us/library/ms188479.aspx

http://f5debug.net/post/2011/04/25/SQL-Server-Integration-Services-(SSIS)-Part-44-Export-Column-Transformations-in-SSIS.aspx

http://www.bimonkey.com/2009/06/the-export-column-transformation/


Thanks Shiven:) If Answer is Helpful, Please Vote



Viewing all articles
Browse latest Browse all 24688

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>