Solved

configuring Flat file destination

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

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

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

Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.

718 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