Character Map Transformation in SSIS is useful to transform input characters. If we want to change our string columns to Upper Case, Lower case, Simplified Chinese, Katakana, Hiragana and Traditional Chinese then character map transformation do the trick for you. It gives you the options to select, whether you want to override the existing column with output result or you want to add it as a new column.
Character Map Transformation in SSIS supports 10 types of operations. The operations and the description is displayed below.
- Lowercase: Converts the string column characters to lowercase. For instance TutorialGateway column is converted into tutorialgateway
- Uppercase: Converts the string column characters to uppercase. For instance TutorialGateway column is converted into TUTORIALGATEWAY
- Bye Reversal: Reverses the bytes order of the Unicode
- Hiragana: Converts Katakana characters to Hiragana characters.
- Katakana: Converts Hiragana characters to Katakana characters.
- Half Width: Converts Full-width characters to Half-width characters. For instance ｈｅｌｌｏ is converted to hello.
- Full Width: Converts Half-width characters to Full-width characters. For instance hello is converted to ｈｅｌｌｏ
- Linguistic casing: In general database uses its system language to store the data into columns. For instance my system stores date in English US format because it is my systems local language. To use other local languages then we can use this Linguistic casing option
- Simplified Chinese: Converts traditional Chinese characters to simplified Chinese characters. For instance, how are you in Simplified Chinese is 你好吗
- Traditional Chinese: Converts simplified Chinese characters to traditional Chinese characters.
Character Map Transformation allows us to select more than one option for a single column however, there are some restrictions while selection. For instance, if we select the lowercase operation then there is no point in selecting the uppercase also. Below table shows the operations we should not select on a single column.
|Selected Operation||Operations Should Not Select|
|Lowercase||Uppercase, Hiragana, Katakana, Half Width and Full Width|
|Uppercase||Lowercase, Hiragana, Katakana, Half Width and Full Width|
|Hiragana||Katakana, Lowercase, Uppercase|
|Katakana||Hiragana, Lowercase, Uppercase|
|Half Width||Full Width, Lowercase, Uppercase|
|Full Width||Half Width, Lowercase, Uppercase|
|Simplified Chinese||Traditional Chinese|
|Traditional Chinese||Simplified Chinese|
Character Map Transformation in SSIS Example
STEP 1: Drag and drop the data flow task from the toolbox to control flow and change the name as Character Map Transformation in SSIS.
Double click on it will open data flow tab.
STEP 2: Drag and drop OLE DB Source, CHARACTER MAP Transformation and ADO.NET Destination into the data flow region
STEP 3: Double click on OLE DB source in the data flow region will open the connection manager settings and provides space to write our SQL statement.
For the time being we had selected [First Name], [Last Name] and [Email ID] from DimEmployees table present in the [Adventure Works DW 2014] data base.
SQL Command we used in the above screenshot is:
STEP 4: Click on columns tab to verify the columns. In this tab we can uncheck the unwanted columns also.
STEP 5: Click ok and connect the output arrow of OLE DB Source to Character Map Transformation.
Double click on Character Map Transformation to configure it
- Input Column: Whatever we selected in the Available Input Columns option will automatically reflected in this option. We can also directly select input column here itself.
- Destination: We have an option to select, Whether we want to replace the original column or we want to add this as a new column. In this example we are using New column option.
- Operation: We already discussed above
- Output Alias: Specify the new column name. It acts same as ALIAS column in SQL
For the time being we are using only Upper and Lower but you can try all the available option. Click ok.
STEP 6: Now we have to provide Server, database and table details of the destination. So double-click on the ADO.NET Destination and provide the required information
Here we are selecting the Character Map Transformation in SSIS table from SSIS Tutorials Database
STEP 7: Click on Mappings tab to check whether the source columns are exactly mapped to the destination columns.
NOTE: If your input column names and destination column names are same then, the intelligence will automatically map. If there is any changes in the column names (any alias columns or any calculated columns) then we have map them manually.
By clicking ok we finished our package. Let us run the package
Let us open the SQL Management Studio Query window to Preview the data
Thank you for Visiting Our Blog