Solved

configuring Flat file destination

Posted on 2011-09-14
4
465 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
4 Comments
 
LVL 21

Expert Comment

by:huslayer
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 500 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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Calculating Business Hours 19 65
Copy Database Wizard Error 3 22
SQL Transaction logs 8 10
Caste datetime 2 24
SQL Server engine let you use a Windows account or a SQL Server account to connect to a SQL Server instance. This can be configured immediatly during the SQL Server installation or after in the Server Authentication section in the Server properties …
In this article I will describe the Backup & Restore method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
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.
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