Solved

SSIS Column Header Mapping

Posted on 2010-09-20
4
338 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
  • 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

Control application downtime with dependency maps

Visualize the interdependencies between application components better with Applications Manager's automated application discovery and dependency mapping feature. Resolve performance issues faster by quickly isolating problematic components.

Join & Write a Comment

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.
The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
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
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

746 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now