Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

SSIS Column Header Mapping

Posted on 2010-09-20
4
Medium Priority
?
360 Views
Last Modified: 2013-11-10
Hi!

I am going to see if I can explain my situation without confusion. :o)

I set up a package to import flat files into an OLE db destination (SS table). These flat files that will be imported will have various column headers (and in any order) and I want to select ONLY those columns in the file that match the column header names in the table and then map them to the appropriate table column.

I tried a simple mapping directly from the flat file connection manager to the table and the data is not being imported into the proper columns, because the columns in the flat file are arranged in a different order.

Is there a component to search specific column header names and map only the data from those columns? Any ideas?

Thank you!
0
Comment
Question by:DixieDev
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 16

Accepted Solution

by:
vdr1620 earned 375 total points
ID: 33719366
NO... There is no such component..you will need to write a script task..

If the file is not big enough.. i would suggest you to load all the data into staging table irrespective of the order and Probably then you can use SQL to insert the data into table from selected columns


Ref:
http://social.msdn.microsoft.com/Forums/en-US/sqlintegrationservices/thread/0503cd40-d28d-49a3-af1c-e19b03033ffe
0
 
LVL 30

Expert Comment

by:Reza Rad
ID: 33722205
as vdr1620 said, there is not dynamic meta data task or transformation in SSIS.
SSIS data flow tasks only will do transfer when data structure is same ( by data structure I mean name of columns, data type of columns and number and order of columns)

if your data structure is not same at all, suggestion of vdr1620 is good work around ( load whole in a table and then select data in unique structure in data flow)


0
 

Author Comment

by:DixieDev
ID: 33724358
OK, thank you for the suggestions!
0
 

Author Closing Comment

by:DixieDev
ID: 33724394
Thank you
0

Featured Post

 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have a large data set and a SSIS package. How can I load this file in multi threading?
In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.

610 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question