{"id":1591,"date":"2011-02-28T01:27:31","date_gmt":"2011-02-27T19:57:31","guid":{"rendered":"http:\/\/JitendraZaa.com\/blog\/?p=1591"},"modified":"2011-02-28T01:27:31","modified_gmt":"2011-02-27T19:57:31","slug":"create-simple-etl-project-in-ssis-filter-records","status":"publish","type":"post","link":"https:\/\/www.jitendrazaa.com\/blog\/sql\/sqlserverintegrationservices\/create-simple-etl-project-in-ssis-filter-records\/","title":{"rendered":"Create Simple ETL Project in SSIS &#8211; Filter Records"},"content":{"rendered":"<p><a title=\"Introduction to SSIS\" href=\"https:\/\/jitendrazaa.com\/blog\/sql\/sqlserverintegrationservices\/etl-dts-and-ssis-introduction\/\" target=\"_blank\">In Previous article, we have seen the basics of SSIS<\/a>. In this article, we will create our first basic application of filtering data from csv file.<\/p>\n<p>As stated, Business intelligence tool is installed with SQL Server 2005 and best part is that it is integrated with Visual Studio 2005. So developer get the benefit of SSIS feature in Visual Studio power to work in disconnected\u00a0environment.<\/p>\n<p>In this article, we will read the csv file and get the required records and write back into another csv file. \u00a0csv file is attached in the source code in this article.<\/p>\n<p>To start the project, click new Project in Visual Studio and select &#8220;Business Intelligence Projects&#8221; and then &#8220;Integration Services Project&#8221; as shown in below figure.<\/p>\n<figure id=\"attachment_1593\" aria-describedby=\"caption-attachment-1593\" style=\"width: 490px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/jitendrazaa.com\/blog\/wp-content\/uploads\/2011\/02\/New-Business-Intelligence-Projects.jpg?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-1593 \" title=\"Create Business Intelligence Projects in Visual Studio\" src=\"https:\/\/i0.wp.com\/jitendrazaa.com\/blog\/wp-content\/uploads\/2011\/02\/New-Business-Intelligence-Projects.jpg?resize=490%2C356&#038;ssl=1\" alt=\"Create Business Intelligence Projects in Visual Studio\" width=\"490\" height=\"356\" \/><\/a><figcaption id=\"caption-attachment-1593\" class=\"wp-caption-text\">Create Business Intelligence Projects in Visual Studio<\/figcaption><\/figure>\n<p><!--more-->After creating the BI (Business Intelligent) project, &#8220;package.dtsx&#8221; is created by default. &#8220;<strong>Package<\/strong>&#8221; is the term used in BI tool of SQL Server to represent the DTS project. one package can run many other packages as we have done in our project. the extension of the package is &#8220;<strong>dtsx<\/strong>&#8220;.<\/p>\n<p>Every package have four Tabs as shown in below image:<\/p>\n<figure id=\"attachment_1595\" aria-describedby=\"caption-attachment-1595\" style=\"width: 421px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/jitendrazaa.com\/blog\/wp-content\/uploads\/2011\/02\/Default-Tabs-in-Package-of-BI-Tool.jpg?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-1595\" title=\"Default Tabs in Package of BI Tool\" src=\"https:\/\/i0.wp.com\/jitendrazaa.com\/blog\/wp-content\/uploads\/2011\/02\/Default-Tabs-in-Package-of-BI-Tool.jpg?resize=421%2C51&#038;ssl=1\" alt=\"Default Tabs in Package of BI Tool\" width=\"421\" height=\"51\" \/><\/a><figcaption id=\"caption-attachment-1595\" class=\"wp-caption-text\">Default Tabs in Package of BI Tool<\/figcaption><\/figure>\n<ol>\n<li><strong>Control Flow : <\/strong>Build and modify the control flow in Package.<\/li>\n<li><strong>Data Flow :<\/strong> Build and modify the data flow for the selected &#8220;Data Flow Task&#8221;.<\/li>\n<li><strong>Event Handlers : <\/strong>Build and modify the control flow foe the selected &#8220;Event Handler&#8221;.<\/li>\n<li><strong>Package Explorer : <\/strong>Displays the content of package in tree view.<\/li>\n<\/ol>\n<p>In this project we will create only Data Flow Task.<\/p>\n<p>Select tab &#8220;Control Flow&#8221; in package and from toolbox, select &#8220;<strong>Data Flow Task<\/strong>&#8220;.<\/p>\n<p>Double click on Data Flow Task, Data Flow tab will open.<\/p>\n<p>Now Drag the &#8220;<strong>Flat File Source<\/strong>&#8221; onto the &#8220;Data Flow&#8221; Panel.<\/p>\n<p>Double click on &#8220;Flat File Source&#8221; and in &#8220;Connection Manager&#8221; option, select on &#8220;New&#8221; flat file connection Manager as shown in below image.<\/p>\n<figure id=\"attachment_1599\" aria-describedby=\"caption-attachment-1599\" style=\"width: 300px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/jitendrazaa.com\/blog\/wp-content\/uploads\/2011\/02\/Flat-File-Source-New-Connection-in-SSIS1.jpg?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-1599\" title=\"Flat File Source New Connection in SSIS\" src=\"https:\/\/i0.wp.com\/jitendrazaa.com\/blog\/wp-content\/uploads\/2011\/02\/Flat-File-Source-New-Connection-in-SSIS1-300x273.jpg?resize=300%2C273&#038;ssl=1\" alt=\"Flat File Source New Connection in SSIS\" width=\"300\" height=\"273\" \/><\/a><figcaption id=\"caption-attachment-1599\" class=\"wp-caption-text\">Flat File Source New Connection in SSIS<\/figcaption><\/figure>\n<p>Select the source file from which we have to extract the record and click on the OK button. Now we have made the source connection\u00a0successfully. You may also have noticed that one connection is created in connection manager panel located at the bottom of the Visual studio\u00a0environment. Select the checkbox saying that<strong> &#8220;Column names in the first data row&#8221; <\/strong>if the first row is column name in csv file.<\/p>\n<p>Now we have the source file, to extract the required records, select &#8220;<strong>Conditional Split<\/strong>&#8221; from the toolbox.<\/p>\n<p>Select &#8220;Flat File Source&#8221; and drag the Green arrow to the &#8220;Conditional Split&#8221; tool.<strong> Green arrow represents the next step to be\u00a0executed\u00a0after successful execution of current block and Red arrow represents the next step to be executed after operation fail or error occurs (Can be used as exception handling).<\/strong><\/p>\n<p><strong> <\/strong><\/p>\n<figure id=\"attachment_1601\" aria-describedby=\"caption-attachment-1601\" style=\"width: 300px\" class=\"wp-caption aligncenter\"><strong><a href=\"https:\/\/i0.wp.com\/jitendrazaa.com\/blog\/wp-content\/uploads\/2011\/02\/Success-and-error-steps-in-SSIS.jpg?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-1601\" title=\"Success and error steps in SSIS\" src=\"https:\/\/i0.wp.com\/jitendrazaa.com\/blog\/wp-content\/uploads\/2011\/02\/Success-and-error-steps-in-SSIS-300x153.jpg?resize=300%2C153&#038;ssl=1\" alt=\"Success and error steps in SSIS\" width=\"300\" height=\"153\" \/><\/a><\/strong><figcaption id=\"caption-attachment-1601\" class=\"wp-caption-text\">Success and error steps in SSIS<\/figcaption><\/figure>\n<p>Now, Double click on &#8220;Conditional Split&#8221;, &#8220;Transformation editor&#8221; will open. Select Column from columns list when cursor is in Condition textbox \u00a0and write <strong>College == &#8220;UCOE&#8221;<\/strong>. This means get only those rows in which the college columns value is &#8220;UCOE&#8221;.<\/p>\n<figure id=\"attachment_1602\" aria-describedby=\"caption-attachment-1602\" style=\"width: 300px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/jitendrazaa.com\/blog\/wp-content\/uploads\/2011\/02\/Conditional-Split-Transformation-Editor.jpg?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-1602\" title=\"Conditional Split Transformation Editor\" src=\"https:\/\/i0.wp.com\/jitendrazaa.com\/blog\/wp-content\/uploads\/2011\/02\/Conditional-Split-Transformation-Editor-300x188.jpg?resize=300%2C188&#038;ssl=1\" alt=\"Conditional Split Transformation Editor\" width=\"300\" height=\"188\" \/><\/a><figcaption id=\"caption-attachment-1602\" class=\"wp-caption-text\">Conditional Split Transformation Editor<\/figcaption><\/figure>\n<p>Now select the &#8220;<strong>Flat File Destination<\/strong>&#8221; from the toolbox and drag the green arrow from &#8220;Condition Split&#8221; to this control. When you will drag the arrow from &#8220;Conditional Split&#8221; to &#8220;Flat File Destination&#8221; one popup will open to ask for output and input as shown in below image:<\/p>\n<figure id=\"attachment_1604\" aria-describedby=\"caption-attachment-1604\" style=\"width: 300px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/jitendrazaa.com\/blog\/wp-content\/uploads\/2011\/02\/Input-Output-Selection-in-Conditional-Split.jpg?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-1604\" title=\"Input Output Selection in Conditional Split\" src=\"https:\/\/i0.wp.com\/jitendrazaa.com\/blog\/wp-content\/uploads\/2011\/02\/Input-Output-Selection-in-Conditional-Split-300x184.jpg?resize=300%2C184&#038;ssl=1\" alt=\"Input Output Selection in Conditional Split\" width=\"300\" height=\"184\" \/><\/a><figcaption id=\"caption-attachment-1604\" class=\"wp-caption-text\">Input Output Selection in Conditional Split<\/figcaption><\/figure>\n<p>As shown in image, we have selected the Output named &#8220;UCOEStudents&#8221; which we had specified in above step and input is provided to the &#8220;Flat File Destination&#8221;<\/p>\n<p>Now double click on &#8220;Flat File Destination&#8221; and in &#8220;File Connection Manager&#8221;, click on New.<\/p>\n<p>It will ask for the flat file format, select delimited and provide the path where file should be saved. In current project, i have provided the file name as &#8220;Output&#8221;.<\/p>\n<p>We can also add the <strong>&#8220;Data Viewer&#8221;<\/strong> after Conditional split, (Right click on Green arrow and select the Data Viewers) which is useful while debugging the application.<\/p>\n<p>Press F5 or click on run, one new file will be created which contains all the records in which college name is &#8220;UCOE&#8221;. In case you have provided any &#8220;Data Viewer&#8221;, then popup will appear displaying the results.<\/p>\n<p><a href=\"https:\/\/jitendrazaa.com\/blog\/wp-content\/uploads\/2011\/02\/SimpleFilter.zip\">Download source code from here<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Creating First ETL (Extract, Transform and Load) project in SSIS (SQL Server Integration Services) &#8211; Filter Records<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"advanced_seo_description":"","jetpack_seo_html_title":"","jetpack_seo_noindex":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"jz_research_post":"","_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[15],"tags":[91],"class_list":["post-1591","post","type-post","status-publish","format-standard","hentry","category-sqlserverintegrationservices","tag-etl"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":1619,"url":"https:\/\/www.jitendrazaa.com\/blog\/sql\/sqlserverintegrationservices\/merge-two-data-in-etl-project-of-ssis\/","url_meta":{"origin":1591,"position":0},"title":"Merge Two Data in ETL project of SSIS","author":"Jitendra","date":"March 10, 2011","format":false,"excerpt":"Example of Merging two data in ETL project of SSIS","rel":"","context":"In &quot;SSIS&quot;","block_context":{"text":"SSIS","link":"https:\/\/www.jitendrazaa.com\/blog\/category\/sql\/sqlserverintegrationservices\/"},"img":{"alt_text":"Merge Two Data in ETL project of SSIS","src":"https:\/\/i0.wp.com\/jitendrazaa.com\/blog\/wp-content\/uploads\/2011\/03\/Merge-Two-Data-in-ETL-project-of-SSIS.jpg?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":1359,"url":"https:\/\/www.jitendrazaa.com\/blog\/sql\/sqlserverintegrationservices\/etl-dts-and-ssis-introduction\/","url_meta":{"origin":1591,"position":1},"title":"ETL , DTS and SSIS Introduction","author":"Jitendra","date":"December 4, 2010","format":false,"excerpt":"Introduction to ETL Services, Data transformation services, SQL Server Integration Services, Advantages of SSIS over DTS, New features of SSIS 2008","rel":"","context":"In &quot;SSIS&quot;","block_context":{"text":"SSIS","link":"https:\/\/www.jitendrazaa.com\/blog\/category\/sql\/sqlserverintegrationservices\/"},"img":{"alt_text":"What is ETL Extraction Transformation Loading","src":"https:\/\/i0.wp.com\/jitendrazaa.com\/blog\/wp-content\/uploads\/2010\/12\/What-is-ETL-Extraction-Transformation-Loading.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":6449,"url":"https:\/\/www.jitendrazaa.com\/blog\/salesforce\/salesforce-integration-with-sql-server-integration-services\/","url_meta":{"origin":1591,"position":2},"title":"Salesforce Integration with SQL Server Integration Services","author":"Jitendra","date":"April 15, 2018","format":false,"excerpt":"Video - Connecting SQL Server Integration Services (SSIS) with Salesforce using COZYROC Connector","rel":"","context":"In &quot;Salesforce&quot;","block_context":{"text":"Salesforce","link":"https:\/\/www.jitendrazaa.com\/blog\/category\/salesforce\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/img.youtube.com\/vi\/RA5azDuubU4\/0.jpg?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":4431,"url":"https:\/\/www.jitendrazaa.com\/blog\/salesforce\/using-dataloader-and-ant-to-backup-salesforce-data-on-ftp-server-video\/","url_meta":{"origin":1591,"position":3},"title":"Using Dataloader and ANT to backup Salesforce data on FTP or SFTP server &#8211; Video","author":"Jitendra","date":"May 4, 2015","format":false,"excerpt":"Tutorial on how to use command line dataloader to save exported Salesforce backup file on FTP or SFTP server","rel":"","context":"In &quot;Salesforce&quot;","block_context":{"text":"Salesforce","link":"https:\/\/www.jitendrazaa.com\/blog\/category\/salesforce\/"},"img":{"alt_text":"Use Dataloader and ANT to back CSV file on FTP Server","src":"https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2015\/05\/Use-Dataloader-and-ANT-to-back-CSV-file-on-FTP-Server-1024x391.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2015\/05\/Use-Dataloader-and-ANT-to-back-CSV-file-on-FTP-Server-1024x391.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2015\/05\/Use-Dataloader-and-ANT-to-back-CSV-file-on-FTP-Server-1024x391.png?resize=525%2C300&ssl=1 1.5x"},"classes":[]},{"id":5152,"url":"https:\/\/www.jitendrazaa.com\/blog\/salesforce\/using-test-loaddata-to-import-records-with-relationship\/","url_meta":{"origin":1591,"position":4},"title":"Using Test.loadData to import records with relationship","author":"Jitendra","date":"January 6, 2016","format":false,"excerpt":"There are many resources and documents available around how to use Test.loadData to create test records in Apex class. As per best practice of writing Test classes in Apex, Its good idea to store master data (aka Seed, Reference data) in static resource and load\u00a0it in Test classes using \"Test.loadData\"\u2026","rel":"","context":"In &quot;Salesforce&quot;","block_context":{"text":"Salesforce","link":"https:\/\/www.jitendrazaa.com\/blog\/category\/salesforce\/"},"img":{"alt_text":"Test.loadData and Static resource in Salesforce","src":"https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2016\/01\/Test.loadData-and-Static-resource-in-Salesforce.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2016\/01\/Test.loadData-and-Static-resource-in-Salesforce.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2016\/01\/Test.loadData-and-Static-resource-in-Salesforce.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2016\/01\/Test.loadData-and-Static-resource-in-Salesforce.png?resize=700%2C400&ssl=1 2x"},"classes":[]},{"id":5835,"url":"https:\/\/www.jitendrazaa.com\/blog\/salesforce\/considerations-and-best-practices-for-salesforce-dataloading\/","url_meta":{"origin":1591,"position":5},"title":"Considerations and Best practices for Salesforce Dataloading","author":"Jitendra","date":"January 29, 2018","format":false,"excerpt":"Although we are doing data loading in Salesforce from ages, its very common to miss some steps or considerations. Therefore thought to list some of best practices and considerations I follow before or during data load process. Developer note field - I mostly create a text field on every object\u2026","rel":"","context":"In &quot;Salesforce&quot;","block_context":{"text":"Salesforce","link":"https:\/\/www.jitendrazaa.com\/blog\/category\/salesforce\/"},"img":{"alt_text":"Salesforce Dataloader","src":"https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2018\/01\/Salesforce-Dataloader.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2018\/01\/Salesforce-Dataloader.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2018\/01\/Salesforce-Dataloader.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2018\/01\/Salesforce-Dataloader.png?resize=700%2C400&ssl=1 2x"},"classes":[]}],"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/posts\/1591","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/comments?post=1591"}],"version-history":[{"count":0,"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/posts\/1591\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/media?parent=1591"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/categories?post=1591"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/tags?post=1591"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}