Solved

SSIS Column Header Mapping

Posted on 2010-09-20
4
349 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 125 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.
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

724 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