How to remove particular columns in SSIS package while doing transformation?

Solution 1:

You can follow the below steps:

  1. Create Data Flow Task
  2. Define Flat File Source and create new connection manager and point to source file.
  3. 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.
  4. Right click Flat file destination, click Edit. It will be throwing a popup as given below. Click Yes.

enter image description here

  1. Define new connection manager pointing to destination file.

enter image description here

  1. Now, point to your empty destination file. If you go to columns tab, only specific columns will be present.
    Browse to empty destination file

  2. Now, connect the Flat file source to Flat file destination. Now, only specific columns will be mapped as given below:

Mapping specific columns

6.Now, you run the package, only specific columns will be loaded.

running specific columns load package

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.

  1. you can create Table in destination with specific columns.
  2. Connect Flat file source to OLEDB Destination, as given below:

SQL Server Destination

  1. Mapping should be done only for specific columns. You dont need specific transformations in the middle.

OLEDB mapping

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.

enter image description here