Derived Column Transformation in SSIS with Example

16
39147

Friends,

SSIS has many transformations tasks and Derived column is one of them. This is used to derive a new columns by using any of the following.

  • Constants or static values
  • Other columns
  • Variable values

This is powerful because we can generate new column run time and can make use of the same. Lets see couple of examples in this post where we can use DERIVED COLUMN transformation.

We are gonna create a table with the columns Name, Salary and Bonus and we will use our SSIS package to generate a new file which will have derived field Gross salary(Sum of Salary and Bonus) and also display the name field in UPPER CASE. PFB the steps followed.

  • First create a table and insert data into it as show below.

  • Open a new project and drag a Data Flow task from toolbox in Control Flow.
  • Edit the Data Flow task by double clicking the object or by selecting EDIT button on Right click on the object. Make sure the Data Flow Page is opened as shown below.

  • Select OLE DB data source from data flow sources and drag and drop it in the data flow.
  • Double click on the OLE DB data source to open a new window where we can set the properties of the connection.
  • Select the connection manager and click on new button to set the connection string as shown below.

  • Drag and drop Derived Column Transformation in to the Data Flow Pane and provide the connection between OLE DB Source and Derived column Transformation and open the properties pane by simply double clicking Derived Column transformation.
  • In the Derived Column Transformation Editor expand the columns folder and drag and drop Column 1 as shown below.

  • Use the function UPPER to convert the data of the desired column to UPPER CASE as shown above. This is as simple as this to add a new column which converts data of a column to UPPER CASE.
  • Now set the destination as explained in the post here. Once destination is set the Execute the Package.
This is it !! As simple as this. The power of this will come when we make use of DIFFERENT FUNCTIONS available in Derived Column transformation. We can use all kinds of Arithmetic,String,Date Functions to achieve your required output. You need to use EXPRESSION column to define the Derived Column expression. You can use all the functions shown in below pic.

This is it Guys ! Hope you understood the concepts. Happy Coding !!

Regards,
Roopesh Babu V

 

16 COMMENTS

  1. Can anyone tell me what is the use of Data Conversion Transformation when its features are available in Derived Column Transformation in SSIS(MSBI)

  2. In a 3 week protocol, one of the recommended dosages is to take 100mg on the first day, followed by 60mg for 10 days then dropping to 40mg for the final 10 days. clomid fast shipping Some women use ovulation predictor kits with Clomid cycles to time their sex These kits are available at drugstores and supermarkets and are are urine tests that the woman does at home These ovulation predictor kits, also referred to as OPKs, are designed to detect the presence of the woman s LH surge The LH surge in the bloodstream begins approximately 36 hours prior to ovulation The ovulation prediction kit test is usually done once daily and when it turns positive then sex either the same day or the next morning are the best for fertility.

  3. In the study s 40 patients 54 glands, the overall mean score on the Chronic Obstructive Sialadenitis Symptoms COSS questionnaire improved by 22. doxycycline dairy Schizonts of Theileria equi are considered highly susceptible to halofuginone and parvaquone 113.

LEAVE A REPLY

Please enter your comment!
Please enter your name here

96 − = 90