?
Solved

SSIS Column Header Mapping

Posted on 2010-09-20
4
Medium Priority
?
354 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

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

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

In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
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.
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
Suggested Courses

752 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