Data Conversion Transformation in SSIS with Example

82
159379

Friends,

In this post we are gonna discuss about Data Conversion transformation. Data Conversion is used to change the data type of a column. Let’s say you have Unicode String format in Source database and the same column is defined as Non Unicode in destination. In this case we need to convert the data before it reaches the destination and Data Conversion is the best bet for such scenarios. If you have a question that “Why the discrepancies(differences)  in the SOURCE and DESTINATION structures “, the answer is “We are not moving data from single source”. We will have different types of sources like excel,notepad,teradata,sql … So, it is obvious that the data types used will not be the same in all the databases and also all the types will not be supported by all databases and hence this Data Conversion is required.

Lets discuss a simple Example. I created a table with the name Employe and inserted some records into the same. PFB the queries used.

create table employe
(
E_id int,
E_name varchar(100),
)

Queries used to insert data.

Insert into employe values(1201,’achyut’)
Insert into employe values(1202,’ambriesh’)
Insert into employe values(1203,’anji’)
Insert into employe values(1204,’anji reddy’)
Insert into employe values(1205,’anuradha’)
Insert into employe values(1206,’anusha’)
Insert into employe values(1207,’anusha’)
Insert into employe values(1208,’arshiya’)
Insert into employe values(1209,’ashok’)

Note – You can use already existing table if you have one.

Follow the below steps to implement Data Conversion transformation.

  • 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.

  • Set the connection to the database by providing the Server name,database name and authentication details if required.
  • After the connection is set, select Data Access mode as “Table or View” as shown below and then select the table which we created just now.

  • Click on columns page and select the columns we have to use as a source.
  • The data source is set and now drag and drop Data Conversion transformation into Data Flow page and set the OLE DB Source Output as Input to Data Conversion transformation.
  • Double Click Data Conversion to change the data type of any column you wish to and you can do that by changing DATA TYPE Column as shown below.

  • You c an see the data type of column E_Name is changed from Non unicode to unicode below.

  • Now the data type will be changed when ever the data passes through this transformation during the time of execution. Let’s configure the output to end this.
  • Select a Flat File Destination and drop it in Data Flow page.
  • Set the output of data conversion transformation as input to the flat file destination as shown below.

  • Double click on Flat file destination and set the flat file connection properties as shown below.

  • Once the connection is set then click on Mappings page and check the mappings are proper or not.
  • Everything is SET and now we are ready to execute the package. Execute the package and make sure every control turns to GREEN which means successful.

  • The above task moved data from a  table in SQL database to TEXT file and it also taken care of changing the data type of columns while moving.

 

Data Conversion is very useful one in the cases where you need to change the data type of columns. This is it !!

Happy Coding !!

 

Regards,

Roopesh Babu V

82 COMMENTS


  1. 經典賽轉播免費

    2023年第五屆世界棒球經典賽即將拉開帷幕!台灣隊被分在A組,小組賽定於2023年3月8日至3月15日進行,淘汰賽時間為3月15日至3月20日,冠軍賽將在3月21日舉行。比賽將由各組前兩名晉級8強複賽,你準備好一起看世界棒球經典賽了嗎?更多詳情請參考富遊的信息!

    以下是比賽的詳細賽程安排:

    分組賽
    A組:台灣台中市,2023年3月8日至3月12日,洲際球場
    B組:日本東京都,2023年3月9日至3月13日,東京巨蛋
    C組:美國亞利桑那州鳳凰城,2023年3月11日至3月15日,大通銀行球場
    D組:美國佛羅里達州邁阿密,2023年3月11日至3月15日,馬林魚球場

    淘汰賽
    八強賽(Game 1、2):日本東京都,2023年3月15日至3月16日,東京巨蛋
    八強賽(Game 3、4):美國佛羅里達州邁阿密,2023年3月17日至3月18日,馬林魚球場
    四強賽(半決賽):美國佛羅里達州邁阿密,2023年3月19日至3月20日,馬林魚球場
    冠軍賽(決賽):美國佛羅里達州邁阿密,2023年3月21日,馬林魚球場

    你可以參考以上賽程安排,計劃觀看世界棒球經典賽

  2. Могу рекомендовать Вам посетить сайт, на котором есть много информации на интересующую Вас тему.


    Извиняюсь, но это мне не совсем подходит. Кто еще, что может подсказать? writing courses, will writing courses и [url=https://trumbella.com/hello-world/]https://trumbella.com/hello-world/[/url] courses writing skills

  3. 娛樂城
    娛樂城:不同類型遊戲讓你盡情娛樂

    現今,娛樂城已成為許多人放鬆身心、娛樂休閒的首選之一,透過這些娛樂城平台,玩家可以享受到不同種類的遊戲,從棋牌遊戲、電子遊戲到電競遊戲,選擇相對應的遊戲類型,可以讓你找到最適合自己的娛樂方式。

    棋牌遊戲:普及快、易上手、益智

    棋牌遊戲有兩個平台分別為OB棋牌和好路棋牌,玩家可以透過這兩個平台與朋友聯繫對戰。在不同國家,有著撲克或麻將的獨特玩法和規則。棋牌遊戲因其普及快、易上手、益智等特點而受到廣大玩家的喜愛,像是金牌龍虎、百人牛牛、二八槓、三公、十三隻、

  4. [url=https://pravrielt.ru/]Квартиры в Сочи[/url]

    Определитесь с регионом мегаполисам, на котором алчите завоевать жилье. Учтите близость к траву, инфраструктуру зоны, автотранспортную элементарность также остальные факторы.
    Квартиры в Сочи

  5. about [url=https://www.toddlercopenhagen.com/dansk-hygge-som-faellesnaevner/#comment-143793]https://www.toddlercopenhagen.com/dansk-hygge-som-faellesnaevner/#comment-143793[/url] I implore you to check out the

  6. 娛樂城:不同類型遊戲讓你盡情娛樂

    現今,娛樂城已成為許多人放鬆身心、娛樂休閒的首選之一,透過這些娛樂城平台,玩家可以享受到不同種類的遊戲,從棋牌遊戲、電子遊戲到電競遊戲,選擇相對應的遊戲類型,可以讓你找到最適合自己的娛樂方式。

    棋牌遊戲:普及快、易上手、益智

    棋牌遊戲有兩個平台分別為OB棋牌和好路棋牌,玩家可以透過這兩個平台與朋友聯繫對戰。在不同國家,有著撲克或麻將的獨特玩法和規則。棋牌遊戲因其普及快、易上手、益智等特點而受到廣大玩家的喜愛,像是金牌龍虎、百人牛牛、二八槓、三公、十三隻、

  7. [url=https://silkcard.ru/]Как сделать карту в Binance в России[/url] – Оформи карту Binance, Забудь про санкции с картой Visa Binance

  8. [url=https://kmssport-dsk.ru/]Детские спортивные комплексы[/url]

    Sport занятия быть владельцем большое значение для самочувствия детей. Они не чуть только способствуют физическому выковыванию, хотя равно воспитывают выдержку, выносливость равным образом настойчивость.
    Детские спортивные комплексы

  9. Замечательно, а альтернатива?


    Вы попали в самую точку. Мне кажется это отличная мысль. Я согласен с Вами. writing courses online best, english courses writing а также [url=https://almeidafrias.adv.br/advocacia-empresarial-e-processos-trabalhistas/]https://almeidafrias.adv.br/advocacia-empresarial-e-processos-trabalhistas/[/url] writing skills courses

  10. Выкуп машин. Срочно – в любом состоянии, срочно продать авто. Скупка автомобилей в любом состоянии, только у нас!
    [url=https://vikup-avto-msk77.ru/]продать машину срочно[/url]
    срочный автовыкуп – [url=https://vikup-avto-msk77.ru/]https://www.vikup-avto-msk77.ru[/url]
    [url=http://maps.google.sm/url?q=http://vikup-avto-msk77.ru]http://com7.jp/ad/?http://vikup-avto-msk77.ru[/url%5D

    [url=http://guugl.org/hello-world/#comment-112367]Срочный выкуп авто в любом состоянии – Наша компания предлагает срочный выкуп авто в Москве и области по максимально выгодным условиям.[/url] dacaf5b

  11. Очень хорошая фраза


    Я разбираюсь в этом вопросе. Готов помочь. играть в блэкджек без регистрации, покер блэкджек как играть или [url=https://wohnmobile-grossmann.de/index.php/component/k2/item/7-phasellus-eget-est-magna-donec-in-nunc-sapien-sit-amet]https://wohnmobile-grossmann.de/index.php/component/k2/item/7-phasellus-eget-est-magna-donec-in-nunc-sapien-sit-amet[/url] как играть в блэкджек на даймонде

  12. Скупка авто. Срочно – в любом состоянии, скупка машин. Скупка автомобилей в любом состоянии, только у нас!
    [url=https://vykup-auto-krasnodar123.ru/]автовыкуп Краснодар[/url]
    выкуп авто с пробегом в Краснодаре – [url=http://www.vykup-auto-krasnodar123.ru]http://vykup-auto-krasnodar123.ru/[/url]
    [url=https://google.dm/url?q=http://vykup-auto-krasnodar123.ru]http://maps.google.cl/url?q=https://vykup-auto-krasnodar123.ru[/url]

    [url=http://cisco.oic.com.vn/products.php?product=CISCO1812%7B47%7DK9]Продать машину срочно дорого – Наша компания предлагает срочный выкуп авто в Краснодаре и области по максимально выгодным условиям.[/url] b0d682f

  13. [url=https://secthorvideonab.ru/]Видеонаблюдение[/url]

    Рации равным образом зрительные переговорные прибора – это прибора, тот или другой оказать содействие умножению чувства сохранности также в течение то ну ятси действуют сверху функциональность гарнизона чи офиса.
    Видеонаблюдение

  14. Скупка автомобилей. Срочно – в любом состоянии, срочный выкуп автомобилей дорого. Скупка автомобилей в любом состоянии, только у нас!
    [url=https://vykup-avto-volgograd134.ru/]срочный выкуп авто[/url]
    выкуп автомобилей дорого – [url=https://vykup-avto-volgograd134.ru]http://vykup-avto-volgograd134.ru/[/url]
    [url=http://www.abortionreview.org/?URL=vykup-avto-volgograd134.ru]http://google.net/url?q=http://vykup-avto-volgograd134.ru[/url]

    [url=http://typeapparel.com/?p=1#comment-44902]Срочный автовыкуп – Наша компания предлагает срочный выкуп авто в Волгограде и области по максимально выгодным условиям.[/url] 8bfb0d6

  15. Скупка автомобилей. Срочно – в любом состоянии, срочный выкуп автомобилей. Скупка автомобилей в любом состоянии, только у нас!
    [url=https://vykup-avto-ekaterinburg789.ru/]автовыкуп Екатеринбург[/url]
    скупка авто – [url=http://vykup-avto-ekaterinburg789.ru]http://vykup-avto-ekaterinburg789.ru/[/url]
    [url=http://google.td/url?q=http://vykup-avto-ekaterinburg789.ru]http://isci.med.miami.edu/?URL=vykup-avto-ekaterinburg789.ru[/url]

    [url=https://www.forward-consultancy.com/includes/common/securimage/securimage_show.php]Скупка автомобилей в Екатеринбурге – Наша компания предлагает срочный выкуп авто в Екатеринбурге и области по максимально выгодным условиям.[/url] c8bfb0d

  16. [url=https://pmbrandplatya1.ru/]Платья[/url]

    В ТЕЧЕНИЕ наше ятси, одежды остановились шибко популярными средь женщин. Текущий стиль показывается стильным равным образом в течение в свою очередь ятси функциональным.
    Платья

  17. [url=https://pmbrandplatya1.ru/]Платья[/url]

    НА наше время, одежды стали очень славными среди женщин. Этот стиль считается популярным (а) также в течение в свою очередь ятси функциональным.
    Платья

  18. [url=http://streichplenkapro.ru/]ручной упаковщик стрейч пленкой[/url]

  19. [url=https://pmbrandplatyavecher1.ru/]Вечерние платья[/url]

    Автор этих строк видим, яко выбор безупречного вечернего одежды может быть черт ногу сломит темой, экстренно разве что вы вознамериваетесь выглядеть я не могу поверить и подчеркнуть личную индивидуальность.
    Вечерние платья

  20. [url=https://pmbrandplatyavecher1.ru/]Вечерние платья[/url]

    Пишущий эти строки знаем, яко религия совершенного вечернего платья что ль быть непростой задачей, особенно если ваша милость стремитесь смотреться потрясающе также подчеркнуть свойскую индивидуальность.
    Вечерние платья

  21. Ну они и дают жару
    employees mending networks and computers, [url=https://nbpostgazette.com/contact-us/#comment-3655]https://nbpostgazette.com/contact-us/#comment-3655[/url] Whereas making suggestions to users on a regular basis every week. As

  22. [url=https://prodent-zub.ru/]Стоматолог[/url]

    Автор этих строк оказываем полный рентгеноспектр зуболечебных услуг. Автор этих строк используем самые прогрессивные методы диагностики и лечения.
    Стоматолог

  23. [url=https://prodent-zub.ru/]Стоматолог[/url]

    Автор оказываем шаровой рентгеноспектр стоматологических услуг. Автор используем наиболее нынешние технологии диагностики (а) также лечения.
    Стоматолог

  24. По моему мнению Вы не правы. Могу отстоять свою позицию.
    the trump plaza lodge and [url=https://greencampus.umy.ac.id/news/kakaya_polyza_ot_kamina_v_dome.html]games-monitoring.com[/url] in atlantic city went bankrupt and shut in 2014.

  25. Охотно принимаю. На мой взгляд это актуально, буду принимать участие в обсуждении.
    [url=http://professor-murmann.info/?URL=https%3A%2F%2Fad69.com]http://professor-murmann.info/?URL=https%3A%2F%2Fad69.com[/url]

  26. [url=https://instagram.com/1winbet.com.br]1win[/url]

    1win started its activity in 2016. After the rebranding, it changed its name to 1win and began to rapidly with vogue thanks to a useful mobile rendition, strengthen representing a dozen languages and a afield tip program.

    instagram.com/1winbet.com.br

  27. [url=https://instagram.com/1winbet.com.br]instagram.com/1winbet.com.br[/url]

    1win started its work in 2016. After the rebranding, it changed its name to 1win and began to rapidly earn lionization thanks to a convenient mobile model, buttress in return a dozen languages and a afield bonus program.

    1win-bet.com.br

  28. не нравится такое
    |here is|for} more information on [url=http://kamishoukou.com/2018/11/20/%e8%84%b1%e6%af%9b%e3%83%a2%e3%83%8b%e3%82%bf%e3%83%bc%e5%8b%9f%e9%9b%86%e3%81%97%e3%81%be%e3%81%99/#comment-140983]http://kamishoukou.com/2018/11/20/%e8%84%b1%e6%af%9b%e3%83%a2%e3%83%8b%e3%82%bf%e3%83%bc%e5%8b%9f%e9%9b%86%e3%81%97%e3%81%be%e3%81%99/#comment-140983[/url] Take a look at our own

  29. Вы абсолютно правы. В этом что-то есть и это хорошая мысль. Готов Вас поддержать.
    получите полную аналитику и долю рынка [url=https://genesis-market.com/]genesis market[/url].

LEAVE A REPLY

Please enter your comment!
Please enter your name here

26 − 23 =