SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Automatically Mapping Flat File Sources Data types to Destination


Automatically Mapping Flat File Sources Data types to Destination

Author
Message
Ryan1
Ryan1
Valued Member
Valued Member (73 reputation)Valued Member (73 reputation)Valued Member (73 reputation)Valued Member (73 reputation)Valued Member (73 reputation)Valued Member (73 reputation)Valued Member (73 reputation)Valued Member (73 reputation)

Group: General Forum Members
Points: 73 Visits: 130
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
Ryan1
Ryan1
Valued Member
Valued Member (73 reputation)Valued Member (73 reputation)Valued Member (73 reputation)Valued Member (73 reputation)Valued Member (73 reputation)Valued Member (73 reputation)Valued Member (73 reputation)Valued Member (73 reputation)

Group: General Forum Members
Points: 73 Visits: 130
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.
Phil Parkin
Phil Parkin
SSCoach
SSCoach (18K reputation)SSCoach (18K reputation)SSCoach (18K reputation)SSCoach (18K reputation)SSCoach (18K reputation)SSCoach (18K reputation)SSCoach (18K reputation)SSCoach (18K reputation)

Group: General Forum Members
Points: 18843 Visits: 20460
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!


Help us to help you. For better, quicker and more-focused answers to your questions, consider following the advice in this link.

If the answer to your question can be found with a brief Google search, please perform the search yourself, rather than expecting one of the SSC members to do it for you.

Please surround any code or links you post with the appropriate IFCode formatting tags. It helps readability a lot.
Ryan1
Ryan1
Valued Member
Valued Member (73 reputation)Valued Member (73 reputation)Valued Member (73 reputation)Valued Member (73 reputation)Valued Member (73 reputation)Valued Member (73 reputation)Valued Member (73 reputation)Valued Member (73 reputation)

Group: General Forum Members
Points: 73 Visits: 130
Ah okay, thanks
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search