Solved

configuring Flat file destination

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

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

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

How to leverage one TLS certificate to encrypt Microsoft SQL traffic and Remote Desktop Services, versus creating multiple tickets for the same server.
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…
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

863 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

24 Experts available now in Live!

Get 1:1 Help Now