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 SSIS character map transformation do the trick for you. It gives you the option 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 converted into tutorialgateway
- Uppercase: Converts the string column characters to uppercase. For example, TutorialGateway column turns into TUTORIALGATEWAY
- Bye Reversal: This SSIS Character Map Transformation 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, ｈｅｌｌｏ converted to hello.
- Full Width: This SSIS Character Map Transformation 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 example, my system stores date in English US format because it is my system’s local language. To use other regional languages, then we can use this Linguistic casing option
- Simplified Chinese: This SSIS Character Map Transformation 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 in SSIS allows us to select more than one option for a single column. However, there are some restrictions during selection. For instance, if we choose the lowercase operation, then there is no point in selecting the uppercase also. The below table shows the SSIS actions 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 the 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] database.
SQL Command we used in the above screenshot is:
USE AdventureWorksDW2014 GO SELECT FirstName ,LastName ,EmailAddress FROM DimEmployee
STEP 4: Click on the 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 the SSIS Character Map Transformation to configure it
- Input Column: Whatever we selected in the Available Input Columns option automatically reflect in this option. We can also directly select the 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 the New column option.
- Operation: We already discussed above
- Output Alias: Specify the new column name. It acts the same as ALIAS column in SQL
For the time being, we are using only Upper and Lower. However, you can try all the available options in SSIS character map transformation. Click ok.
STEP 6: Now, we have to provide the 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 the Database
STEP 7: Click on the Mappings tab to check whether the ssis character map source columns accurately mapped to the destination columns.
NOTE: If your input column names and destination column names are the same, the intelligence automatically maps. If there are any changes in the column names (any alias or calculated columns), we have to map them manually.
By clicking ok, we finished our SSIS Character Map Transformation package. Let us run the package
Let us open the SQL Query window to Preview the data