?
Solved

configuring Flat file destination

Posted on 2011-09-14
4
Medium Priority
?
491 Views
Last Modified: 2013-11-10
I am creating an SSIS package that includes several data flow tasks. Each of these data flow tasks have an OLEDB Source configured to use a different sql command from variable. The OLEDB source is connected to a flat file destination. The Flat file destination is configured to use a flat file connection manager. I want to map all the input columns to output columns with the same name. I am experiencing problems configuring the mapping in the flat file destination. I do see all the Available Input Columns, but do not see output columns with the same name. I can go in the advanced editor and Add Columns to External Columns, the rename them to be same as my input columns, but that seems to be a very tedious process, as I have to this for several (50-60) columns in each of the data flow task.

Is there an easier way that I am missing?

Any help is highly appreciated.

Thanks You.
0
Comment
Question by:patd1
[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
4 Comments
 
LVL 21

Expert Comment

by:Jason Yousef, MS
ID: 36538323
The other way is to create them in the text file!!

or use a dynamic script task to dump the text file dynamically
http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/SSIS/A_5989-Dynamically-Iterate-over-a-list-of-tables-or-views-and-export-to-flat-files.html
0
 
LVL 11

Expert Comment

by:SThaya
ID: 36541047
Hi,

  Please try the below steps .

1. Make sure all your input columns have the same column name (all Sources )
2. join all the inputs with the Unionall .
3. connect the Flat file
0
 
LVL 21

Accepted Solution

by:
Alpesh Patel earned 2000 total points
ID: 36541071
If you flat file source has not columns names then it will take as column1, column2 ....column N.

Its good to create sample file with first row as header. set as destination file and it will automatically set destination file schema based on file.
0
 

Author Comment

by:patd1
ID: 36542731

SThaya:
Hi,

  Please try the below steps .

1. Make sure all your input columns have the same column name (all Sources )
2. join all the inputs with the Unionall .
3. connect the Flat file

tried that, but didn't work. in the unionAll, i see that all the input columns have an output column with the same name, but when I connect it to flat file destination, i don't see same output columns names.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
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…
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.
Suggested Courses

770 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