Hi,
I have a data file which has output like following
abc20091011
abc20091011
abc20091111
abc20091111
xyz20091011
xyz20090909
I need separate files for abc20091011, abc200911, xyz20090909 and so on. Problem is the output is dynamic. It could have any number of records. Right now I have 4 unique data but it will change to maybe 20 in my next run. So for each unique record I need separate file. How can I handle this?
Dynamic output files
Moderators: chulett, rschirm, roy
I'm not sure if there are any stage in PX that would allow output to dynamic files, perhaps the External Target stage? Server allegedly does - the Folder stage but to be honest I've never used it in that fashion. Or you could always go the 'build op' route and put together something in C++ to do that for you.
Another possibility is building a single file and then 'splitting' the file post job, using something like csplit perhaps.
Another possibility is building a single file and then 'splitting' the file post job, using something like csplit perhaps.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Participant
- Posts: 612
- Joined: Thu May 03, 2007 4:59 am
- Location: Melbourne
Datastage parallel (C++) routine to create files dynamically
Link to - Datastage parallel (C++) routine to create files dynamically for every record in single job.
http://it.toolbox.com/blogs/dw-soa/data ... ally-21095
http://it.toolbox.com/blogs/dw-soa/data ... ally-21095
Joshy George
<a href="http://www.linkedin.com/in/joshygeorge1" ><img src="http://www.linkedin.com/img/webpromo/bt ... _80x15.gif" width="80" height="15" border="0"></a>
<a href="http://www.linkedin.com/in/joshygeorge1" ><img src="http://www.linkedin.com/img/webpromo/bt ... _80x15.gif" width="80" height="15" border="0"></a>
-
- Participant
- Posts: 10
- Joined: Sat Dec 05, 2009 2:05 pm
-
- Premium Member
- Posts: 783
- Joined: Mon Jan 16, 2006 10:17 pm
- Location: Sydney, Australia