Sort Transformation in SSIS with Example

33
29331

Friends,

This is one of the transformations which doesn’t need much explanation. Sort is used to SORT the input data in ascending or descending order. You can apply sort on multiple columns of the input data. Let us see an example of the same.

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

  • Drag and drop Sort Transformation into the Data Flow pane and provide connection between OLE DB Source and Multicast Transformation.
  • Now select the transformation and edit it for setting sort properties. Select the column names on which we are gonna sort the data.

  • You can use Sort Type option to SORT the data either in Ascending or in Descending order. Sort Order is set to give an order to the columns when we have more than one in SORT transformation.
  • Now drag and drop OLE DB Destination and give the output of Sort transformation and as input to the OLE DB destinations, then EDIT the destination transformation to set the connection properties.
  • Once the Destination is SET then trigger the package and you can see the data ordered in the order specified in SORT Transformation.
  • If we have same value more than once and if you wish to eliminate that duplicate then you can make use of the option “Remove rows with Duplicates values” in Sort transformation.

  • Now if you trigger the package, you can see the duplicates will get removed as shown below.

This is how we can use Sort transformation to SORT the data in any order. You can also hide the duplicate records if we have any in the column specified in Sort Transformation.

Happy Coding !!!

Regards,
Roopesh Babu V

33 COMMENTS

  1. In our publication, we bring you the most recent updates and entertaining news about the most popular UK stars from the worlds of the press, reality TV, and popular culture. Whether you’re a fan of hit reality shows like Love Island, The Only Way Is Essex, or Made in Chelsea, or you’re eager to track the lives of the UK’s top social media influencers, our blog covers it all. From fascinating behind-the-scenes drama to exclusive interviews, we keep you in the loop with everything happening in the world of your most-followed celebrities – https://eventnewslondon.com/ .

    UK reality TV contestants have gained huge attention over the years, changing from everyday individuals into household names with massive fan followings. Our publication investigates their personal and professional lives, offering looks into their latest endeavors, connections, and dramas. Whether it’s a new romance brewing on Love Island or a cast member from Geordie Shore unveiling a new business, you’ll find thorough stories that reveal the glamorous yet sometimes chaotic lives of these figures.

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

    Ключевым моментом, формирующих тип скважины (https://staratel21.ru/kesson-dlya-skvazhiny-naznachenie-ustrojstvo-preimushhestva/ ), становится грунтовые слои и глубина водоносного слоя. В Ленинградской области чаще всего создают артезианские источники, которые дают доступ к незагрязненной и стабильной воде из глубоких пластов. Такие скважины известны надежным сроком службы и отличным качеством водоносных ресурсов, однако их пробивка нуждается больших вложений и специального инструментария.

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

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

  3. In today’s rapid world, staying informed about the latest updates both domestically and globally is more vital than ever. With a plethora of news outlets struggling for attention, it’s important to find a trusted source that provides not just news, but perspectives, and stories that matter to you. This is where [url=https://www.usatoday.com/]USAtoday.com [/url], a leading online news agency in the USA, stands out. Our commitment to delivering the most current news about the USA and the world makes us a primary resource for readers who seek to stay ahead of the curve.

    Subscribe for Exclusive Content: By subscribing to USAtoday.com, you gain access to exclusive content, newsletters, and updates that keep you ahead of the news cycle.

    [url=https://www.usatoday.com/]USAtoday.com [/url] is not just a news website; it’s a dynamic platform that strengthens its readers through timely, accurate, and comprehensive reporting. As we navigate through an ever-changing landscape, our mission remains unwavering: to keep you informed, engaged, and connected. Subscribe to us today and become part of a community that values quality journalism and informed citizenship.

LEAVE A REPLY

Please enter your comment!
Please enter your name here

one + three =