Solved

configuring Flat file destination

Posted on 2011-09-14
4
467 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: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 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

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

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

Suggested Solutions

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…
If you have heard of RFC822 date formats, they can be quite a challenge in SQL Server. RFC822 is an Internet standard format for email message headers, including all dates within those headers. The RFC822 protocols are available in detail at:   ht…
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties
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

785 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