How to remove particular columns in SSIS package while doing transformation?
Solution 1:
You can follow the below steps:
- Create Data Flow Task
- Define Flat File Source and create new connection manager and point to source file.
- Create empty flat file with the headers you want. Define Flat File Destination and point to Flat file empty destination, by following the subsequent steps.
- Right click Flat file destination, click Edit. It will be throwing a popup as given below. Click
Yes
.
- Define new connection manager pointing to destination file.
-
Now, point to your empty destination file. If you go to columns tab, only specific columns will be present.
-
Now, connect the Flat file source to Flat file destination. Now, only specific columns will be mapped as given below:
6.Now, you run the package, only specific columns will be loaded.
UPDATE: Sorry. I misunderstood destination as Flat File Destination. If you are having SQL Server Data Warehouse as the destination, you need to follow below steps.
- you can create Table in destination with specific columns.
- Connect Flat file source to OLEDB Destination, as given below:
- Mapping should be done only for specific columns. You dont need specific transformations in the middle.
Solution 2:
Even if the provided approach will work fine, why you should load all useless columns into your data pipeline to ignore them at the end. You can simply uncheck them from the Flat File Source editor.