{"id":11883,"date":"2024-03-14T06:30:37","date_gmt":"2024-03-14T05:30:37","guid":{"rendered":"https:\/\/expert-only.com\/?p=11883"},"modified":"2024-03-18T14:15:48","modified_gmt":"2024-03-18T13:15:48","slug":"import-csv-file-into-sql-server-with-ssis","status":"publish","type":"post","link":"https:\/\/expert-only.com\/en\/ssis\/import-csv-file-into-sql-server-with-ssis\/","title":{"rendered":"Import CSV file into SQL Server using SSIS"},"content":{"rendered":"\n<p><strong>You have a CSV file you need to load into a SQL Server database? We&#8217;ve got you covered with this step by step guide, perfect for simplifying your data work. Using SSIS, you can easily import data from CSV a file into a SQL Server table using one package.<\/strong><\/p>\n\n\n\n<p>CSV files are great for all sorts of data, like customer lists or sales figures. With our guide, you&#8217;ll use Microsoft SSIS and Visual Studio 2019 to make this process easier.<\/p>\n\n\n\n<p>We&#8217;re going to walk you through 10 essential steps to import your data smoothly and effectively. Each step is easy to follow, ensuring you can get the job done, no matter your skill level.<\/p>\n\n\n\n<p><strong>Here are the 10 simple steps to import CSV data into a SQL Server using SSIS:<\/strong><\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Prepare Your CSV File<\/strong>: Get it ready for SSIS.<\/li>\n\n\n\n<li><strong>Set Up Your SQL Server Table<\/strong>: Ready your database with SSMS.<\/li>\n\n\n\n<li><strong>Create Your SSIS Package<\/strong>: We&#8217;ll show you how, step by step.<\/li>\n\n\n\n<li><strong>Connect to Your CSV<\/strong>: Link up to your data source.<\/li>\n\n\n\n<li><strong>Adjust Your Columns<\/strong>: Fine-tune the details.<\/li>\n\n\n\n<li><strong>Fix Column Types and Lengths<\/strong>: Make sure everything matches up.<\/li>\n\n\n\n<li><strong>Convert Data as Needed<\/strong>: Use SSIS tools to tweak data.<\/li>\n\n\n\n<li><strong>Point to Your SQL Server<\/strong>: Set up where your data will go.<\/li>\n\n\n\n<li><strong>Run the SSIS Package<\/strong>: Import your CSV with confidence.<\/li>\n\n\n\n<li><strong>Check Your Imported Data<\/strong>: Make sure it&#8217;s all there and correct.<\/li>\n<\/ol>\n\n\n\n<p><br>We&#8217;ve split the process into two parts: first, preparing and connecting your CSV file, and second, setting up your SQL Server table and importing the data. This guide is all about making your data import as straightforward as possible. Let&#8217;s get started and make your data work for you!<\/p>\n\n\n\n<p><strong><em>Let&#8217;s check first a few requirements<\/em><\/strong><\/p>\n\n\n\n<p>First of all, to import CSV data files into a SQL Server table using an Integration Services package, let&#8217;s check a few mandatory prerequisites: <\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Be able to connect to an existing database or <strong><a href=\"https:\/\/expert-only.com\/en\/dba\/create-sql-server-database-with-ssms\/\">create a new SQL Server database with SSMS<\/a><\/strong><\/li>\n\n\n\n<li><a href=\"https:\/\/expert-only.com\/en\/ssis\/install-ssis-in-visual-studio-2019\/\"><strong>Install Visual Studio and the SSIS projects extension<\/strong><\/a> for the package development.<\/li>\n<\/ul>\n\n\n\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_82_2 ez-toc-wrap-center counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/expert-only.com\/en\/ssis\/import-csv-file-into-sql-server-with-ssis\/#1-prepare-the-csv-source-file-to-import-with-ssis-premium\" >1. Prepare the CSV source file to import with SSIS (Premium)<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/expert-only.com\/en\/ssis\/import-csv-file-into-sql-server-with-ssis\/#2-prepare-a-target-sql-server-table-with-ssms-premium\" >2. Prepare a target SQL Server table with SSMS (Premium)<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/expert-only.com\/en\/ssis\/import-csv-file-into-sql-server-with-ssis\/#3-create-the-ssis-import-package-and-the-data-flow\" >3. Create the SSIS import package and the data flow<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/expert-only.com\/en\/ssis\/import-csv-file-into-sql-server-with-ssis\/#4-create-an-ssis-connection-to-the-csv-data-file-to-import\" >4. Create an SSIS connection to the CSV data file to import<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/expert-only.com\/en\/ssis\/import-csv-file-into-sql-server-with-ssis\/#5-set-up-columns-to-import-in-ssis-and-check-csv-file-encoding\" >5. Set up columns to import in SSIS and check CSV file encoding<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/expert-only.com\/en\/ssis\/import-csv-file-into-sql-server-with-ssis\/#6-adjust-csv-file-type-and-columns-length-in-ssis\" >6. Adjust CSV file type and columns length in SSIS<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/expert-only.com\/en\/ssis\/import-csv-file-into-sql-server-with-ssis\/#7-add-the-derived-column-component-and-link-it-to-the-source\" >7. Add the Derived Column component and link it to the source<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/expert-only.com\/en\/ssis\/import-csv-file-into-sql-server-with-ssis\/#8-configure-the-ssis-ole-db-destination-component\" >8. Configure the SSIS OLE DB Destination component<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/expert-only.com\/en\/ssis\/import-csv-file-into-sql-server-with-ssis\/#9-run-the-integration-services-package-to-import-csv-data\" >9. Run the Integration Services package to import CSV data<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/expert-only.com\/en\/ssis\/import-csv-file-into-sql-server-with-ssis\/#10-check-csv-data-imported-in-the-target-table\" >10. Check CSV data imported in the target table<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-11\" href=\"https:\/\/expert-only.com\/en\/ssis\/import-csv-file-into-sql-server-with-ssis\/#about-importing-csv-data-files-using-integration-services\" >About importing CSV data files using Integration Services<\/a><\/li><\/ul><\/nav><\/div>\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"1-prepare-the-csv-source-file-to-import-with-ssis-premium\"><\/span>1. Prepare the CSV source file to import with SSIS (Premium)<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Indeed, to start the tutorial and import CSV data into a SQL Server database using SSIS, you must follow this first step. <strong>Simply start by downloading the file used in the example and then create the target table to store the customers.<\/strong> The Customers_Data.csv file contains 49 rows, consisting of one header row and 48 rows of automatically generated data.<\/p>\n\n\n\n<p class=\"has-text-align-center\"><strong><em><a href=\"https:\/\/expert-only.com\/en\/ssis-online-training\/\" target=\"_blank\" rel=\"noreferrer noopener\">To download the resources: Flat file and query, enrol in our Full SSIS Video training.<\/a><\/em><\/strong><\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><a href=\"https:\/\/expert-only.com\/en\/ssis-online-training\/\" target=\"_blank\" rel=\"noreferrer noopener\"><img loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"422\" src=\"https:\/\/expert-only.com\/wp-content\/uploads\/2023\/06\/ssis-course-image_422_text.jpg\" alt=\"SSIS Training Full Course (SQL Server Integration Services)\" class=\"wp-image-29857\" style=\"width:750px;height:auto\" srcset=\"https:\/\/expert-only.com\/wp-content\/uploads\/2023\/06\/ssis-course-image_422_text.jpg 750w, https:\/\/expert-only.com\/wp-content\/uploads\/2023\/06\/ssis-course-image_422_text-300x169.jpg 300w\" sizes=\"auto, (max-width: 750px) 100vw, 750px\" \/><\/a><figcaption class=\"wp-element-caption\"><strong><a href=\"https:\/\/expert-only.com\/en\/ssis-online-training\/\" target=\"_blank\" rel=\"noreferrer noopener\">SSIS Training Full Course (SQL Server Integration Services)<\/a><\/strong><\/figcaption><\/figure><\/div>\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"2-prepare-a-target-sql-server-table-with-ssms-premium\"><\/span>2. Prepare a target SQL Server table with SSMS (Premium)<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>The purpose of this SSIS package is to import the 48 rows from the CSV flat file into the SQL Server Customers table without errors. The creation code of the table is available on our <strong><a href=\"https:\/\/www.udemy.com\/course\/data-integration-with-ssis-sql-server-integration-services\/?couponCode=EO-SSIS-24-BEA561FDF\">SSIS train<\/a><a href=\"https:\/\/www.udemy.com\/course\/data-integration-with-ssis-sql-server-integration-services\/?couponCode=EO-SSIS-24-BEA561FDF\" target=\"_blank\" rel=\"noreferrer noopener\">ing on Udemy<\/a><\/strong>. Execute the code in a sandbox or a development database using SSMS on Windows..<\/p>\n\n\n\n<p class=\"has-text-align-center\"><strong><em><strong><em><a href=\"https:\/\/www.udemy.com\/course\/data-integration-with-ssis-sql-server-integration-services\/?couponCode=EO-SSIS-24-BEA561FDF\" target=\"_blank\" rel=\"noreferrer noopener sponsored nofollow\">To download the resources: Flat file and query, enrol in our Full SSIS Video training.<\/a><\/em><\/strong><\/em><\/strong><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"3-create-the-ssis-import-package-and-the-data-flow\"><\/span>3. Create the SSIS import package and the data flow<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>This step is about how to manage the connection to the flat file used as a source. This step is done using a <a href=\"https:\/\/expert-only.com\/en\/ssis\/create-a-simple-ssis-data-flow\/\"><strong>simple SSIS data flow<\/strong><\/a>.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Open Microsoft Visual studio 2019 and <a href=\"https:\/\/expert-only.com\/en\/ssis\/create-ssis-project-visual-studio-2019\/\"><strong>create a new SSIS project<\/strong><\/a> or open an existing project.<\/li>\n\n\n\n<li>Open an existing package to modify its content. Alternatively, right click and add a new package to the SSIS project.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-adding-a-traditional-ssis-data-flow\"><em>Adding a traditional SSIS Data Flow<\/em><\/h3>\n\n\n\n<p>From the Visual Studio workspace, locate the SSIS toolbox on the left. Select <strong><em>Data flow Task<\/em> <\/strong>and drag it onto the workspace and <strong>double click to open it<\/strong>.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"729\" height=\"685\" src=\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/add-ssis-data-flow-to-control-flow.jpg\" alt=\"New SSIS data flow to load a text file into a SQL database\" class=\"wp-image-11381\" style=\"width:728px;height:684px\" srcset=\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/add-ssis-data-flow-to-control-flow.jpg 729w, https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/add-ssis-data-flow-to-control-flow-300x282.jpg 300w\" sizes=\"auto, (max-width: 729px) 100vw, 729px\" \/><figcaption class=\"wp-element-caption\"><em>New SSIS data flow to load a CSV data file into a SQL Server table<\/em><\/figcaption><\/figure><\/div>\n\n\n<p>In the <strong>SSIS Toolbox<\/strong>, now select the <strong><em>Flat File Source<\/em><\/strong> component and drag it onto the workspace. Then double click on it to open it and set it up.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"739\" height=\"720\" src=\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-add-flat-file-source-to-data-flow.jpg\" alt=\"Add the Flat File Source to the SSIS data stream (Flat File Source)\" class=\"wp-image-11520\" srcset=\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-add-flat-file-source-to-data-flow.jpg 739w, https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-add-flat-file-source-to-data-flow-300x292.jpg 300w\" sizes=\"auto, (max-width: 739px) 100vw, 739px\" \/><figcaption class=\"wp-element-caption\">Add the Flat File Source to the SSIS data stream (Flat File Source)<\/figcaption><\/figure><\/div>\n\n\n<h3 class=\"wp-block-heading\"><em>Using SSIS variables to manage file paths<\/em><\/h3>\n\n\n\n<p>With SSIS, almost all components and properties can be set with variables. It is good practice to use variables to manage paths, connection strings and changing SSIS settings efficiently. Like changing environments from development to test or production for example.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"4-create-an-ssis-connection-to-the-csv-data-file-to-import\"><\/span>4. Create an SSIS connection to the CSV data file to import<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Create and configure a new flat file connection by selecting the following items:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>First, enter the name of the connection.<\/li>\n\n\n\n<li>Then the path of the file.<\/li>\n\n\n\n<li>Select the encoding of the file (code page).<\/li>\n\n\n\n<li>The format, in our case it is delimited.<\/li>\n\n\n\n<li>Check the delimiter at the end of the header (header row delimiter).<\/li>\n\n\n\n<li>If the column names are in the first line of the file<\/li>\n<\/ol>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"640\" height=\"548\" src=\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/flat-file-connection-manager-editor-csv-configuration.jpg\" alt=\"Configure a new connection to the CSV file in the SSIS package\" class=\"wp-image-11763\" srcset=\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/flat-file-connection-manager-editor-csv-configuration.jpg 640w, https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/flat-file-connection-manager-editor-csv-configuration-300x257.jpg 300w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><figcaption class=\"wp-element-caption\">Configure a new connection to the CSV file in the SSIS package<\/figcaption><\/figure><\/div>\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"5-set-up-columns-to-import-in-ssis-and-check-csv-file-encoding\"><\/span>5. Set up columns to import in SSIS and check CSV file encoding<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>The goal here is very important, set up the columns and check the data:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Validate or modify the row delimiter<\/li>\n\n\n\n<li>Choose the column delimiter, which is the character at the end of each line of data<\/li>\n\n\n\n<li>Check if the data and in particular the accents or special characters are displayed correctly. For example, lines 29 and 32 have an error because the accents are misinterpreted. The encoding must be changed.<\/li>\n<\/ol>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"752\" height=\"592\" src=\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/flat-file-connection-manager-columns-invalid-characters.jpg\" alt=\"Choose the row and column delimiter and check the data\" class=\"wp-image-11769\" srcset=\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/flat-file-connection-manager-columns-invalid-characters.jpg 752w, https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/flat-file-connection-manager-columns-invalid-characters-300x236.jpg 300w\" sizes=\"auto, (max-width: 752px) 100vw, 752px\" \/><figcaption class=\"wp-element-caption\">Choose the row and column delimiter and check the data<\/figcaption><\/figure><\/div>\n\n\n<h3 class=\"wp-block-heading\"><em>Use the right encoding for the text file using Notepad++<\/em><\/h3>\n\n\n\n<p>Change the encoding of the source file until the data is displayed correctly. To find the encoding of the file, simply use <a href=\"https:\/\/notepad-plus-plus.org\/downloads\/\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>Notepad++<\/strong><\/a> and open the file. There are 2 possibilities to check the encoding:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>From the Encoding menu<\/li>\n\n\n\n<li>At the bottom right of the software where information about the file is displayed.<\/li>\n<\/ul>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"734\" height=\"552\" src=\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/check-flat-file-encoding-in-notepad.jpg\" alt=\"Double check the encoding of a text file easily with Notepad++\" class=\"wp-image-11779\" srcset=\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/check-flat-file-encoding-in-notepad.jpg 734w, https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/check-flat-file-encoding-in-notepad-300x226.jpg 300w, https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/check-flat-file-encoding-in-notepad-678x509.jpg 678w, https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/check-flat-file-encoding-in-notepad-326x245.jpg 326w, https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/check-flat-file-encoding-in-notepad-80x60.jpg 80w\" sizes=\"auto, (max-width: 734px) 100vw, 734px\" \/><figcaption class=\"wp-element-caption\"><em>Double check the encoding of a text file easily with Notepad++<\/em><\/figcaption><\/figure><\/div>\n\n\n<h3 class=\"wp-block-heading\" id=\"h-setting-up-the-flat-file-connection-manager\"><em>Setting up the Flat File Connection Manager<\/em><\/h3>\n\n\n\n<p>To load the text file without errors, change the encoding and use 65001 (UTF-8) instead of 1252 (ANSI &#8211; Latin I) proposed by default by SSIS.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"641\" height=\"562\" src=\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/flat-file-connection-manager-editor-csv-utf8-encoding.jpg\" alt=\"Change the file encoded to 65001 (UTF-8) on the code page setting\" class=\"wp-image-11775\" srcset=\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/flat-file-connection-manager-editor-csv-utf8-encoding.jpg 641w, https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/flat-file-connection-manager-editor-csv-utf8-encoding-300x263.jpg 300w\" sizes=\"auto, (max-width: 641px) 100vw, 641px\" \/><figcaption class=\"wp-element-caption\"><em>Change the file encoded to 65001 (UTF-8) on the code page setting<\/em><\/figcaption><\/figure><\/div>\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"6-adjust-csv-file-type-and-columns-length-in-ssis\"><\/span>6. Adjust CSV file type and columns length in SSIS<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>After the selection of the correct encoding, click on the Columns tab again and check the data again.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"641\" height=\"562\" src=\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/flat-file-connection-manager-check-data.jpg\" alt=\"The SSIS data preview now displays data and accents correctly\" class=\"wp-image-11788\" style=\"width:641px;height:562px\" srcset=\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/flat-file-connection-manager-check-data.jpg 641w, https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/flat-file-connection-manager-check-data-300x263.jpg 300w\" sizes=\"auto, (max-width: 641px) 100vw, 641px\" \/><figcaption class=\"wp-element-caption\"><em>The SSIS data preview now displays data and accents correctly<\/em><\/figcaption><\/figure><\/div>\n\n\n<p>Now click on the Advanced tab. Next, rename the columns if necessary and assign them a consistent data type. By default, SSIS uses the DT_STR type with a length of 50 characters. Use the <em>DT_WSTR<\/em> type with the correct length to <a href=\"https:\/\/expert-only.com\/en\/sql-server-error\/arithmetic-overflow-error-converting-expression-to-data-type-int\/\"><strong>avoid SQL Server conversion errors<\/strong><\/a> later in the development of the SSIS package. So adapt the type of each column to the length of the fields in our customer table: <\/p>\n\n\n\n<p class=\"has-text-align-center\"><strong><em><a href=\"https:\/\/www.udemy.com\/course\/data-integration-with-ssis-sql-server-integration-services\/?couponCode=EO-SSIS-24-BEA561FDF\">To download the resources and see the data types: Flat file, query and data types, enrol in our Full SSIS Video training.<\/a><\/em><\/strong><\/p>\n\n\n\n<p>Please note that the names and data types of the columns in the flat file connection must match the names and data types of the columns of the target table in the database, which will make data mapping in SSIS much easier. Now check the columns in the Flat File Source component:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"751\" height=\"634\" src=\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-flat-file-source-editor-check-columns-mapping.jpg\" alt=\"Check Column Mappings in the  Flat File Source Component of SSIS\" class=\"wp-image-11833\" srcset=\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-flat-file-source-editor-check-columns-mapping.jpg 751w, https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-flat-file-source-editor-check-columns-mapping-300x253.jpg 300w\" sizes=\"auto, (max-width: 751px) 100vw, 751px\" \/><figcaption class=\"wp-element-caption\"><em>Check Column Mappings in the  Flat File Source Component of SSIS<\/em><\/figcaption><\/figure><\/div>\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"7-add-the-derived-column-component-and-link-it-to-the-source\"><\/span>7. Add the Derived Column component and link it to the source<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>The second part of the text file import into a SQL Server database is the mapping and the connection in SSIS. Indeed, configure now the target database component and load the data with the right format. A format compatible with the data of the flat file.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>In the <em>SSIS toolbox<\/em>, from the <em>Common<\/em> part. Drag the <em>Derived Column<\/em> transformation into the data flow.<\/li>\n\n\n\n<li>Then link the <em>Flat File Source<\/em> component to <em>Derived Column<\/em> as shown in the image below.<\/li>\n<\/ul>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"540\" height=\"640\" src=\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-data-flow-import-flat-file-add-derived-column.jpg\" alt=\"Add the SSIS Derived Column component and link it to the Flat File Source that point to the CSV file to import\" class=\"wp-image-11808\" srcset=\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-data-flow-import-flat-file-add-derived-column.jpg 540w, https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-data-flow-import-flat-file-add-derived-column-253x300.jpg 253w\" sizes=\"auto, (max-width: 540px) 100vw, 540px\" \/><figcaption class=\"wp-element-caption\">Add the Derived Column component and link it to the Flat File Source<\/figcaption><\/figure><\/div>\n\n\n<h3 class=\"wp-block-heading\"><em>Configure the SSIS derived column to change customer ID to integer<\/em><\/h3>\n\n\n\n<p>The <em>CustomerID<\/em> column is of type integer, so a new one must be created based on the one in the file. To convert it to a new SSIS column of type Integer (DT_I8).<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"786\" height=\"635\" src=\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-derived-column-transformation-editor-1.jpg\" alt=\"Create a derived column to convert Customer ID from text to integer\" class=\"wp-image-11826\" srcset=\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-derived-column-transformation-editor-1.jpg 786w, https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-derived-column-transformation-editor-1-300x242.jpg 300w, https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-derived-column-transformation-editor-1-768x620.jpg 768w\" sizes=\"auto, (max-width: 786px) 100vw, 786px\" \/><figcaption class=\"wp-element-caption\">Create a derived column to convert Customer ID from text to integer<\/figcaption><\/figure><\/div>\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"8-configure-the-ssis-ole-db-destination-component\"><\/span>8. Configure the SSIS OLE DB Destination component<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>To do this, you must first <a href=\"https:\/\/expert-only.com\/en\/ssis\/create-a-connection-to-sql-server-database-in-ssis\/\">create a connection to the target database from the SSIS connection manager<\/a>. Set up the data mapping in the Mappings tab to check that the flat file and SQL Server table columns match. Use the <strong><em>Derived Column.CustomerID<\/em><\/strong> column and not the original flat file column.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"751\" height=\"635\" src=\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-map-derived-coloumn-to-ole-db-destination.jpg\" alt=\"Use the new column for the Customer ID derived column\" class=\"wp-image-11849\" style=\"width:751px;height:635px\" srcset=\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-map-derived-coloumn-to-ole-db-destination.jpg 751w, https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-map-derived-coloumn-to-ole-db-destination-300x254.jpg 300w\" sizes=\"auto, (max-width: 751px) 100vw, 751px\" \/><figcaption class=\"wp-element-caption\">Use the new column for the Customer ID derived column<\/figcaption><\/figure><\/div>\n\n\n<h3 class=\"wp-block-heading\"><em>Use the automatic mapping option with SSIS<\/em><\/h3>\n\n\n\n<p>Note: It is possible to automatically map SSIS columns in the next step. Make sure to name all source and target columns the same.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"9-run-the-integration-services-package-to-import-csv-data\"><\/span>9. Run the Integration Services package to import CSV data<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>After configuring the data flow, run the SSIS package and import the CSV file into the SQL Server Customer table. The package processes the 48 initial rows and integrate then into the database.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"600\" height=\"640\" src=\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-execute-flat-file-import-into-db.jpg\" alt=\"Press F5 or click Run to launch the SSIS package to import the CSV file\" class=\"wp-image-11845\" srcset=\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-execute-flat-file-import-into-db.jpg 600w, https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-execute-flat-file-import-into-db-281x300.jpg 281w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><figcaption class=\"wp-element-caption\"><em>Press F5 or click Run to launch the SSIS package to import the CSV file<\/em><\/figcaption><\/figure><\/div>\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"10-check-csv-data-imported-in-the-target-table\"><\/span>10. Check CSV data imported in the target table<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Of course the last step is a verification, so using SSMS check the data by running these two SQL queries below. The table has 48 rows, identical to the contents of the file. And if you have the same results, then your SSIS package to import CSV file into a SQL Server table is a success.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"mssql\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">SELECT COUNT(*) AS [NumberOfCustomers]\nFROM   [dbo].[Customers];\n\nSELECT *  \nFROM   [dbo].[Customers];<\/pre>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"640\" height=\"540\" src=\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssms-check-result-and-lines-imported-in-db.jpg\" alt=\"SSMS queries to display the result of the CSV import into the SQL Server table with SSIS \" class=\"wp-image-11853\" srcset=\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssms-check-result-and-lines-imported-in-db.jpg 640w, https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssms-check-result-and-lines-imported-in-db-300x253.jpg 300w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><figcaption class=\"wp-element-caption\">SSMS queries to display the result of the CSV import into the SQL Server table with SSIS <\/figcaption><\/figure><\/div>\n\n\n<p>Finally, run a SELECT query to check the data loaded into the database. This example allows you to easily import a text file into a SQL Server database with SSIS. It is also possible to load several flat files into a database with an SSIS loop (For Each File component).<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><em>Avoid csv files import errors with SQL Server Integration Services<\/em><\/h3>\n\n\n\n<p>A common error is the <em>SSIS code 0x80019002<\/em> which indicates that the system reaches the maximum number of errors allowed. It is indeed possible to set the number of errors tolerated via the <em>MaximumErrorCount<\/em> parameter. However, we recommended it only in the case of automatic management of errors and re-loads. Three key elements to check to successfully integrate files and avoid the classic SSIS file integration errors :<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Column separator<\/strong><\/li>\n\n\n\n<li><strong>Line separator<\/strong><\/li>\n\n\n\n<li><strong>Encoding of the CSV file<\/strong><\/li>\n<\/ol>\n\n\n\n<p>So, CSV and flat files integration in general with SSIS and Visual Studio is powerful. However, errors are common, unless you prepare and check the data types in both the source file and the target table beforehand. To take it a step further, it is possible to load an Excel file into a table with SSIS in the same way. The previous tutorial is bout how to <a href=\"https:\/\/expert-only.com\/en\/ssis\/create-a-simple-ssis-data-flow\/\">create a simple data flow to load a table into another and enrich the data<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"about-importing-csv-data-files-using-integration-services\"><\/span>About importing CSV data files using Integration Services<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>To conclude, this step by step SSIS tutorial explains how to import a CSV text file into a SQL Server table with SSIS using a package developed with Visual Studio and without using any script. The data structure, the column names and the proper configuration of all SSIS components are key.<\/p>\n\n\n\n<figure class=\"wp-block-embed aligncenter is-type-wp-embed is-provider-sql-and-it-tutorials wp-block-embed-sql-and-it-tutorials\"><div class=\"wp-block-embed__wrapper\">\n<blockquote class=\"wp-embedded-content\" data-secret=\"hsqJm2DnON\"><a href=\"https:\/\/expert-only.com\/en\/ssis\/create-a-simple-ssis-data-flow\/\">Create a simple SSIS data flow<\/a><\/blockquote><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; clip: rect(1px, 1px, 1px, 1px);\" title=\"&#8220;Create a simple SSIS data flow&#8221; &#8212; SQL and IT Tutorials\" src=\"https:\/\/expert-only.com\/en\/ssis\/create-a-simple-ssis-data-flow\/embed\/#?secret=AWV9GWVuGS#?secret=hsqJm2DnON\" data-secret=\"hsqJm2DnON\" width=\"500\" height=\"282\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe>\n<\/div><\/figure>\n","protected":false},"excerpt":{"rendered":"<div class=\"mh-excerpt\"><p>You have a CSV file you need to load into a SQL Server database? We&#8217;ve got you covered with this step by step guide, perfect for simplifying your data work. Using SSIS, you can easily import data from CSV <a class=\"mh-excerpt-more\" href=\"https:\/\/expert-only.com\/en\/ssis\/import-csv-file-into-sql-server-with-ssis\/\" title=\"Import CSV file into SQL Server using SSIS\">&#8230;<\/a><\/p>\n<\/div>","protected":false},"author":1,"featured_media":6158,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[516],"tags":[417],"class_list":{"0":"post-11883","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-ssis","8":"tag-file"},"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v21.7 (Yoast SEO v26.2) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Import CSV file into SQL Server using SSIS - Microsoft BI<\/title>\n<meta name=\"description\" content=\"To import a CSV file in a SQL Server table using SSIS, set up the Integration Services data flow from the CSV source file to the SQL table.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/expert-only.com\/en\/ssis\/import-csv-file-into-sql-server-with-ssis\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Import CSV file into SQL Server using SSIS\" \/>\n<meta property=\"og:description\" content=\"To import a CSV file in a SQL Server table using SSIS, set up the Integration Services data flow from the CSV source file to the SQL table.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/expert-only.com\/en\/ssis\/import-csv-file-into-sql-server-with-ssis\/\" \/>\n<meta property=\"og:site_name\" content=\"SQL and IT Tutorials\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/ExpertOnlyCom\/\" \/>\n<meta property=\"article:published_time\" content=\"2024-03-14T05:30:37+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-03-18T13:15:48+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/expert-only.com\/wp-content\/uploads\/2017\/08\/computer-hard-drive-7CCA596F23D_1920x1080.jpeg\" \/>\n\t<meta property=\"og:image:width\" content=\"1920\" \/>\n\t<meta property=\"og:image:height\" content=\"1080\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Expert-Only\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@expert_only\" \/>\n<meta name=\"twitter:site\" content=\"@expert_only\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Expert-Only\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"12 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/expert-only.com\/en\/ssis\/import-csv-file-into-sql-server-with-ssis\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/expert-only.com\/en\/ssis\/import-csv-file-into-sql-server-with-ssis\/\"},\"author\":{\"name\":\"Expert-Only\",\"@id\":\"https:\/\/expert-only.com\/en\/#\/schema\/person\/406a9576b52944f018739a42046873ef\"},\"headline\":\"Import CSV file into SQL Server using SSIS\",\"datePublished\":\"2024-03-14T05:30:37+00:00\",\"dateModified\":\"2024-03-18T13:15:48+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/expert-only.com\/en\/ssis\/import-csv-file-into-sql-server-with-ssis\/\"},\"wordCount\":1897,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/expert-only.com\/en\/#organization\"},\"image\":{\"@id\":\"https:\/\/expert-only.com\/en\/ssis\/import-csv-file-into-sql-server-with-ssis\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/expert-only.com\/wp-content\/uploads\/2017\/08\/computer-hard-drive-7CCA596F23D_1920x1080.jpeg\",\"keywords\":[\"File\"],\"articleSection\":[\"SSIS\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/expert-only.com\/en\/ssis\/import-csv-file-into-sql-server-with-ssis\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/expert-only.com\/en\/ssis\/import-csv-file-into-sql-server-with-ssis\/\",\"url\":\"https:\/\/expert-only.com\/en\/ssis\/import-csv-file-into-sql-server-with-ssis\/\",\"name\":\"Import CSV file into SQL Server using SSIS - Microsoft BI\",\"isPartOf\":{\"@id\":\"https:\/\/expert-only.com\/en\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/expert-only.com\/en\/ssis\/import-csv-file-into-sql-server-with-ssis\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/expert-only.com\/en\/ssis\/import-csv-file-into-sql-server-with-ssis\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/expert-only.com\/wp-content\/uploads\/2017\/08\/computer-hard-drive-7CCA596F23D_1920x1080.jpeg\",\"datePublished\":\"2024-03-14T05:30:37+00:00\",\"dateModified\":\"2024-03-18T13:15:48+00:00\",\"description\":\"To import a CSV file in a SQL Server table using SSIS, set up the Integration Services data flow from the CSV source file to the SQL table.\",\"breadcrumb\":{\"@id\":\"https:\/\/expert-only.com\/en\/ssis\/import-csv-file-into-sql-server-with-ssis\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/expert-only.com\/en\/ssis\/import-csv-file-into-sql-server-with-ssis\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/expert-only.com\/en\/ssis\/import-csv-file-into-sql-server-with-ssis\/#primaryimage\",\"url\":\"https:\/\/expert-only.com\/wp-content\/uploads\/2017\/08\/computer-hard-drive-7CCA596F23D_1920x1080.jpeg\",\"contentUrl\":\"https:\/\/expert-only.com\/wp-content\/uploads\/2017\/08\/computer-hard-drive-7CCA596F23D_1920x1080.jpeg\",\"width\":1920,\"height\":1080},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/expert-only.com\/en\/ssis\/import-csv-file-into-sql-server-with-ssis\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"en\",\"item\":\"https:\/\/expert-only.com\/en\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Import CSV file into SQL Server using SSIS\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/expert-only.com\/en\/#website\",\"url\":\"https:\/\/expert-only.com\/en\/\",\"name\":\"SQL and IT Tutorials\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/expert-only.com\/en\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/expert-only.com\/en\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/expert-only.com\/en\/#organization\",\"name\":\"Expert-Only\",\"url\":\"https:\/\/expert-only.com\/en\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/expert-only.com\/en\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/expert-only.com\/wp-content\/uploads\/2017\/09\/cropped-logo_Expert-Only.jpg\",\"contentUrl\":\"https:\/\/expert-only.com\/wp-content\/uploads\/2017\/09\/cropped-logo_Expert-Only.jpg\",\"width\":381,\"height\":174,\"caption\":\"Expert-Only\"},\"image\":{\"@id\":\"https:\/\/expert-only.com\/en\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/ExpertOnlyCom\/\",\"https:\/\/x.com\/expert_only\",\"https:\/\/www.youtube.com\/channel\/UCMS5sR_FwAetB0FmciNvUaA\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/expert-only.com\/en\/#\/schema\/person\/406a9576b52944f018739a42046873ef\",\"name\":\"Expert-Only\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/expert-only.com\/en\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/084b15660763ff5b13bb60b2f52f97bb?s=96&d=identicon&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/084b15660763ff5b13bb60b2f52f97bb?s=96&d=identicon&r=g\",\"caption\":\"Expert-Only\"}}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Import CSV file into SQL Server using SSIS - Microsoft BI","description":"To import a CSV file in a SQL Server table using SSIS, set up the Integration Services data flow from the CSV source file to the SQL table.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/expert-only.com\/en\/ssis\/import-csv-file-into-sql-server-with-ssis\/","og_locale":"en_US","og_type":"article","og_title":"Import CSV file into SQL Server using SSIS","og_description":"To import a CSV file in a SQL Server table using SSIS, set up the Integration Services data flow from the CSV source file to the SQL table.","og_url":"https:\/\/expert-only.com\/en\/ssis\/import-csv-file-into-sql-server-with-ssis\/","og_site_name":"SQL and IT Tutorials","article_publisher":"https:\/\/www.facebook.com\/ExpertOnlyCom\/","article_published_time":"2024-03-14T05:30:37+00:00","article_modified_time":"2024-03-18T13:15:48+00:00","og_image":[{"width":1920,"height":1080,"url":"https:\/\/expert-only.com\/wp-content\/uploads\/2017\/08\/computer-hard-drive-7CCA596F23D_1920x1080.jpeg","type":"image\/jpeg"}],"author":"Expert-Only","twitter_card":"summary_large_image","twitter_creator":"@expert_only","twitter_site":"@expert_only","twitter_misc":{"Written by":"Expert-Only","Est. reading time":"12 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/expert-only.com\/en\/ssis\/import-csv-file-into-sql-server-with-ssis\/#article","isPartOf":{"@id":"https:\/\/expert-only.com\/en\/ssis\/import-csv-file-into-sql-server-with-ssis\/"},"author":{"name":"Expert-Only","@id":"https:\/\/expert-only.com\/en\/#\/schema\/person\/406a9576b52944f018739a42046873ef"},"headline":"Import CSV file into SQL Server using SSIS","datePublished":"2024-03-14T05:30:37+00:00","dateModified":"2024-03-18T13:15:48+00:00","mainEntityOfPage":{"@id":"https:\/\/expert-only.com\/en\/ssis\/import-csv-file-into-sql-server-with-ssis\/"},"wordCount":1897,"commentCount":0,"publisher":{"@id":"https:\/\/expert-only.com\/en\/#organization"},"image":{"@id":"https:\/\/expert-only.com\/en\/ssis\/import-csv-file-into-sql-server-with-ssis\/#primaryimage"},"thumbnailUrl":"https:\/\/expert-only.com\/wp-content\/uploads\/2017\/08\/computer-hard-drive-7CCA596F23D_1920x1080.jpeg","keywords":["File"],"articleSection":["SSIS"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/expert-only.com\/en\/ssis\/import-csv-file-into-sql-server-with-ssis\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/expert-only.com\/en\/ssis\/import-csv-file-into-sql-server-with-ssis\/","url":"https:\/\/expert-only.com\/en\/ssis\/import-csv-file-into-sql-server-with-ssis\/","name":"Import CSV file into SQL Server using SSIS - Microsoft BI","isPartOf":{"@id":"https:\/\/expert-only.com\/en\/#website"},"primaryImageOfPage":{"@id":"https:\/\/expert-only.com\/en\/ssis\/import-csv-file-into-sql-server-with-ssis\/#primaryimage"},"image":{"@id":"https:\/\/expert-only.com\/en\/ssis\/import-csv-file-into-sql-server-with-ssis\/#primaryimage"},"thumbnailUrl":"https:\/\/expert-only.com\/wp-content\/uploads\/2017\/08\/computer-hard-drive-7CCA596F23D_1920x1080.jpeg","datePublished":"2024-03-14T05:30:37+00:00","dateModified":"2024-03-18T13:15:48+00:00","description":"To import a CSV file in a SQL Server table using SSIS, set up the Integration Services data flow from the CSV source file to the SQL table.","breadcrumb":{"@id":"https:\/\/expert-only.com\/en\/ssis\/import-csv-file-into-sql-server-with-ssis\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/expert-only.com\/en\/ssis\/import-csv-file-into-sql-server-with-ssis\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/expert-only.com\/en\/ssis\/import-csv-file-into-sql-server-with-ssis\/#primaryimage","url":"https:\/\/expert-only.com\/wp-content\/uploads\/2017\/08\/computer-hard-drive-7CCA596F23D_1920x1080.jpeg","contentUrl":"https:\/\/expert-only.com\/wp-content\/uploads\/2017\/08\/computer-hard-drive-7CCA596F23D_1920x1080.jpeg","width":1920,"height":1080},{"@type":"BreadcrumbList","@id":"https:\/\/expert-only.com\/en\/ssis\/import-csv-file-into-sql-server-with-ssis\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"en","item":"https:\/\/expert-only.com\/en\/"},{"@type":"ListItem","position":2,"name":"Import CSV file into SQL Server using SSIS"}]},{"@type":"WebSite","@id":"https:\/\/expert-only.com\/en\/#website","url":"https:\/\/expert-only.com\/en\/","name":"SQL and IT Tutorials","description":"","publisher":{"@id":"https:\/\/expert-only.com\/en\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/expert-only.com\/en\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/expert-only.com\/en\/#organization","name":"Expert-Only","url":"https:\/\/expert-only.com\/en\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/expert-only.com\/en\/#\/schema\/logo\/image\/","url":"https:\/\/expert-only.com\/wp-content\/uploads\/2017\/09\/cropped-logo_Expert-Only.jpg","contentUrl":"https:\/\/expert-only.com\/wp-content\/uploads\/2017\/09\/cropped-logo_Expert-Only.jpg","width":381,"height":174,"caption":"Expert-Only"},"image":{"@id":"https:\/\/expert-only.com\/en\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/ExpertOnlyCom\/","https:\/\/x.com\/expert_only","https:\/\/www.youtube.com\/channel\/UCMS5sR_FwAetB0FmciNvUaA"]},{"@type":"Person","@id":"https:\/\/expert-only.com\/en\/#\/schema\/person\/406a9576b52944f018739a42046873ef","name":"Expert-Only","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/expert-only.com\/en\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/084b15660763ff5b13bb60b2f52f97bb?s=96&d=identicon&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/084b15660763ff5b13bb60b2f52f97bb?s=96&d=identicon&r=g","caption":"Expert-Only"}}]}},"_links":{"self":[{"href":"https:\/\/expert-only.com\/en\/wp-json\/wp\/v2\/posts\/11883","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/expert-only.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/expert-only.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/expert-only.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/expert-only.com\/en\/wp-json\/wp\/v2\/comments?post=11883"}],"version-history":[{"count":62,"href":"https:\/\/expert-only.com\/en\/wp-json\/wp\/v2\/posts\/11883\/revisions"}],"predecessor-version":[{"id":30770,"href":"https:\/\/expert-only.com\/en\/wp-json\/wp\/v2\/posts\/11883\/revisions\/30770"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/expert-only.com\/en\/wp-json\/wp\/v2\/media\/6158"}],"wp:attachment":[{"href":"https:\/\/expert-only.com\/en\/wp-json\/wp\/v2\/media?parent=11883"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/expert-only.com\/en\/wp-json\/wp\/v2\/categories?post=11883"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/expert-only.com\/en\/wp-json\/wp\/v2\/tags?post=11883"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}