Automatically Mapping Flat File Sources Data types to Destination

  • Is there anyway to automatically map a flat file sources data types to the ole DB destinations data types? I'd rather not have to go through a data conversion for every source/destination match

    -choosing the 'suggest data types' in the flat file sources options isn't changing them correctly.

    Thanks

  • The easiest way to do this is to go into SQL Management Studio and NOT BIDS.

    ^ Unsure why this doesn't work, maybe I need to be on forum for longer

    https://www.sqlservercentral.com/Forums/Uploads/image-unavailable.png

    I was going to give a screen by screen tutorial.

    -Right click on your database

    -Hover your mouse over tasks

    -Go to Import Data

    -Use this wizard to import data (I used a flat file source) into database tables

    -Part of the wizard has a convert section which will take care of mostly everything

    -Before getting to the finish window, you will be prompted as to whether or not you want to save the package and run immediately.

    -I suggest not running the package immediately, saving it, opening it up in BIDS

    You may have to change some data types (it seems non-Unicode string [varchar] doesn't like choosing it's size automatically) in bids.

    I have run into problems where it required me to edit the package in bids and create an Execute SQL task== utilize the "truncate table" query, other times I did not.

    I hope this helps.

  • Ryan1 (7/31/2013)


    Is there anyway to automatically map a flat file sources data types to the ole DB destinations data types? I'd rather not have to go through a data conversion for every source/destination match

    -choosing the 'suggest data types' in the flat file sources options isn't changing them correctly.

    Thanks

    No one mentioned the Import Wizard as a possible solution because of the way you phrased this question. If you had said something like this:

    Is there any way to automatically map a flat file source's columns to the OLEDB destination table's columns?

    Someone would have suggested the Import Wizard fairly promptly. 'Data types' refers to the definitions of the columns involved (string, int, date etc.) and so your request completely puzzled me!

    If you haven't even tried to resolve your issue, please don't expect the hard-working volunteers here to waste their time providing links to answers which you could easily have found yourself.

  • Ah okay, thanks

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply