Skip to content

shannonlowder.com

Menu
  • About
  • Biml Interrogator Demo
  • Latest Posts
Menu

SQL 301 — SSIS Import And Export Wizard

Posted on January 31, 2011February 9, 2011 by slowder

OK, let’s dive right into the Import and Export Wizard.  If you’re on Vista or Windows 7, hit start, then begin typing “Import and Export Data”  It should find it for you pretty quickly.  If you’re not on one of those two, look for your SQL 2005 or 2008 folder, and search in those folders for the Import and Export Wizard, if you’re on a 64-bit OS, you’ll have two options, one 32-bit, the other 64 bit.  I’m using the Import and Export Wizard for SQL 2008, so if my screen caps look a little different, don’t be too worried.  All this should work on any version.

The splash screen for Import and Export Wizard
The splash screen for Import and Export Wizard

Once you start up the program you should get a screen that looks like the image on the right.  For the example we’re going to run through, please download this file, and save it to your machine.  It’s a CSV file with a list of first middle and last names.

Also, open SSMS, connect to your instance of SQL Server and create the following table:

CREATE TABLE example (
     firstName VARCHAR(255)
   , middleName VARCHAR(255)
   , lastName VARCHAR(255) )

This is the destination table we’re going to use.  I’m putting this table in my AdventureWorks2008R2 Database, if you need a copy, click here.

Define your source.
Define your source.

We’re going to load a simple csv file to a SQL Server 2008 table.  Please click next, to continue.

In this screen, you’re going to select your source.  For our example, please select “Flat File Source” in the first box.  This will cause the wizard to change the layout on the page.  You’ll see new options to browse for your file.  Click “Browse”, and select the file you downloaded earlier.  In order to see the file, you’ll need to change the file type to CSV.  Once you’ve selected the file, names.csv  the only other option you’ll need to change is mark the check box beside next to “Column names in the first data row.”  That way, it will read the header information for you.

Your flat file source configured
Your flat file source configured

Your wizard should know look something like the image to the right.

Now we have to define the destination.  In our example we want to load this data to the table we defined above.  In my example, I’m connecting to my 2008R2 instance, and all I have to change is the database name.

Destination Selected!

Your connection should look like the image to the left.

After you choose your database, click next to continue.  You should now be prompted to select the table name.  Click on the entry that under “Destination” and choose dbo.example.  Since we’ve named the columns in the source csv the same as the the destination table, we don’t need to mess with the Edit Mappings button.

You could press the preview button to verify the mapping works, or you can simply press next to continue.

You’re finished.  Before we carry on, go ahead and check off the Save SSIS Package to your hard drive.  That way you can open the package in BIDS and check out the inner workings of the package you just created.  I’ve uploaded my copy here if you need to grab a copy.  Once you’ve run your package, connect to your instance of SQL and check out the results.

SELECT * FROM dbo.example

You should see an exact copy of the csv in your table.

This may not seem like a huge step, but you’ve now created a simple SSIS package.  The steps you’ve taken are the basis of every ETL you can imagine.  When we come back to SSIS packages, I’ll show you how “you’ve just taken your first step into a larger world.”

If you have any questions, send them in!  I’m here to help!

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Recent Posts

  • A New File Interrogator
  • Using Generative AI in Data Engineering
  • Getting started with Microsoft Fabric
  • Docker-based Spark
  • Network Infrastructure Updates

Recent Comments

  1. slowder on Data Engineering for Databricks
  2. Alex Ott on Data Engineering for Databricks

Archives

  • July 2023
  • June 2023
  • March 2023
  • February 2023
  • January 2023
  • December 2022
  • November 2022
  • October 2022
  • October 2018
  • August 2018
  • May 2018
  • February 2018
  • January 2018
  • November 2017
  • October 2017
  • September 2017
  • August 2017
  • June 2017
  • March 2017
  • February 2014
  • January 2014
  • December 2013
  • November 2013
  • October 2013
  • August 2013
  • July 2013
  • June 2013
  • February 2013
  • January 2013
  • August 2012
  • June 2012
  • May 2012
  • April 2012
  • March 2012
  • February 2012
  • January 2012
  • December 2011
  • November 2011
  • October 2011
  • September 2011
  • August 2011
  • July 2011
  • June 2011
  • May 2011
  • April 2011
  • March 2011
  • February 2011
  • January 2011
  • December 2010
  • November 2010
  • October 2010
  • September 2010
  • August 2010
  • July 2010
  • June 2010
  • May 2010
  • April 2010
  • March 2010
  • January 2010
  • December 2009
  • November 2009
  • October 2009
  • September 2009
  • August 2009
  • July 2009
  • June 2009
  • May 2009
  • April 2009
  • March 2009
  • February 2009
  • January 2009
  • December 2008
  • November 2008
  • October 2008
  • September 2008
  • August 2008
  • July 2008
  • June 2008
  • May 2008
  • April 2008
  • March 2008
  • February 2008
  • January 2008
  • November 2007
  • October 2007
  • September 2007
  • August 2007
  • July 2007
  • June 2007
  • May 2007
  • April 2007
  • March 2007
  • February 2007
  • January 2007
  • December 2006
  • November 2006
  • October 2006
  • September 2006
  • August 2006
  • July 2006
  • June 2006
  • May 2006
  • April 2006
  • March 2006
  • February 2006
  • January 2006
  • December 2005
  • November 2005
  • October 2005
  • September 2005
  • August 2005
  • July 2005
  • June 2005
  • May 2005
  • April 2005
  • March 2005
  • February 2005
  • January 2005
  • November 2004
  • September 2004
  • August 2004
  • July 2004
  • April 2004
  • March 2004
  • June 2002

Categories

  • Career Development
  • Data Engineering
  • Data Science
  • Infrastructure
  • Microsoft SQL
  • Modern Data Estate
  • Personal
  • Random Technology
  • uncategorized
© 2025 shannonlowder.com | Powered by Minimalist Blog WordPress Theme