Please start any new threads on our new site at http://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Development Tools
 Other Development Tools
 How to add Dynamic column in the Flatfile Source?
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Arunraj
Starting Member

India
18 Posts

Posted - 11/12/2014 :  02:38:14  Show Profile  Reply with Quote
Hi Friends,

Actually i have Flatfile as a TXT files .In that i have 100 Columns and i need to import those datas in to SQL Server 2012 by using SSIS package.

As my Manager instructions we need to add a new column in the Flat-file as well as Database.In database i have added the new column name as FtpDate and Datatype as DATE(Purpose of this column is to know on which date we have loaded the particular Source File).

Now in Flatfile we cannot add manually .we need the add it dynamically Because these flatfiles are coming different location from the world.
We are getting those files through FTP and storing into the Local Folders and then we start the process by calling the Local path.

My Problem is how to add a dynamic column name (FtpDate) into the flatfile Source.
After Added the new column (FtpDate) into the database i tried to run the package and i got the Error which i mentions below.

[SSIS.Pipeline] Error: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED. The PrimeOutput method on Flat File Source returned error code 0xC0202091. The component returned a failure code when the pipeline engine called PrimeOutput(). The meaning of the failure code is defined by the component, but the error is fatal and the pipeline stopped executing. There may be error messages posted before this with more information about the failure.


Any one Please suggest me how to do this.
I am waiting for your Answers friends !!!!

gbritton
Flowing Fount of Yak Knowledge

2780 Posts

Posted - 11/12/2014 :  09:18:21  Show Profile  Reply with Quote
Use a Derived Column transformation to add the FtpDate column to the dataflow before the OLEDB destination transformation.
Go to Top of Page

pantsbox
Starting Member

3 Posts

Posted - 03/11/2015 :  08:46:48  Show Profile  Reply with Quote
You need to have a test file created with new column included and use it to set the metadata within SSIS. On pointing to it and refreshing it will add new column to list from where you can select it into the output (inside flat file source). Then you need to refresh entire package pipeline to make sure column is picked up by all the tasks. In case some intermediate task loses synchronization it will indicate it by showing a red balloon. Then you need to double click and open it and fix the issues by clicking ok.
Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.02 seconds. Powered By: Snitz Forums 2000