Tuesday 28 August 2012

CHARACTER MAP TRANSFORMATION





Introduction:
            By using char map transformation we can perform character operations such as conversion from lower to uppercase. It supports only string data type.
“Char map” transformation can convert the column data or add a new column (Copy of the source column with required character case) to the transformation output.

Requirement:
            Source table is Sample_source shown below.


I want to load the source data into target, with tow additional "Name" fields (Name_Lower and Name_Upper) one is with lower case and other one with upper case.

Package creation:
  • In control flow, drags and drop “Data flow task” into designer surface.
  • In Data flow, drag and drop “OLEDB source” and map source table.
  • Drag and drop “Character map” transformation, and connect the source green arrow to the “transformation.
  • Edit the “Char map” transformation. select required columns to do character operations from “Input column” section, shown below.



  • In “Destination” section we should select “New column”, because we need to create new columns by using source “Name” field.
  • In Operation section we need to select an operation, shown below.



  • In “Output Alias” section give the required names.



  • Click “OK” button to complete the character operations.
  • Take “OLEDB destination” and map the “Char map” output columns to target table.



  • After target mappings, execute the package.



Target table Output:


 

No comments:

Post a Comment