Persist Generated File Infile..Row_Generator

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
prabu
Participant
Posts: 146
Joined: Fri Oct 22, 2004 9:12 am

Persist Generated File Infile..Row_Generator

Post by prabu »

Hi DS folks,
please let me know if there is a way available to persist the input file generated by Row generator.i believe it uses a pipe stream to keep the generated records!

2) i can't find the bad file + param file generated, i see only control + log file even when there is a failure[is it the default behavior??]

please let me know

regards,
Prabu
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

There are many ways. Possibly the easiest is to follow the Row Generator stage with a Copy stage whose second output sends rows to a file.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
prabu
Participant
Posts: 146
Joined: Fri Oct 22, 2004 9:12 am

Post by prabu »

ray.wurlod wrote:There are many ways. Possibly the easiest is to follow the Row Generator stage with a Copy stage whose second output sends rows to a file. ...
Good idea, Ray! BTW, could someone pls explain about the bad file and param not being accessible after a sqlldr failure. Meaning they are not being created, i believe.

pls let me know

regards,
Prabu
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

Pls dont hijack the thread, Create a new post for this purpose.
Last edited by kumar_s on Fri Sep 08, 2006 8:53 am, edited 1 time in total.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
kris007
Charter Member
Charter Member
Posts: 1102
Joined: Tue Jan 24, 2006 5:38 pm
Location: Riverside, RI

Post by kris007 »

Isn't this a new post :roll:
Kris

Where's the "Any" key?-Homer Simpson
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

Alright, I was carried away with "sqlldr failure".
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
prabu
Participant
Posts: 146
Joined: Fri Oct 22, 2004 9:12 am

Re: Persist Generated File Infile..Row_Generator

Post by prabu »

prabu wrote:Hi DS folks,

2) i can't find the bad file + param file generated, i see only control + log file even when there is a failure[is it the default behavior??]

please let me know

regards,
Prabu
any pointers??
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

Are you using the DataStage SQL Load stage to BCP the records into the database?
Sounds like an obvious question but i just wanted to be sure.
If you are then there must be an option in the load stage whether to remove the temp files or not. I know for sure that the UDB load stage has that option, i am guessing the SQL load stage should have that option too.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
prabu
Participant
Posts: 146
Joined: Fri Oct 22, 2004 9:12 am

Post by prabu »

DSguru2B wrote:Are you using the DataStage SQL Load stage to BCP the records into the database?
Sounds like an obvious question but i just wanted to be sure.
If you are then there must be an option in the load stage whether to remove the temp files or not. I know for sure that the UDB load stage has that option, i am guessing the SQL load stage should have that option too.
Hi DSguru,

i am using Oracle Enterprise stage. the issue is i cannot see the BAD files generated.

the log file is having the entry as

Code: Select all

1 Row not loaded because all fields were null.
but usually when you invoke the sqlldr with the BAD option, the offending records [that couldn't be loaded] will be moved into the bad records will be moved into the bad records.

but when invoked it thr' DS with the load option , i coulnt see such a BAD file.

regards,
Prabu
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Perhaps an all-NULL row does not get written into a bad file. Check with your Oracle DBA or Oracle documentation. Or experiment outside of DataStage.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
prabu
Participant
Posts: 146
Joined: Fri Oct 22, 2004 9:12 am

Post by prabu »

ray.wurlod wrote:Perhaps an all-NULL row does not get written into a bad file. Check with your Oracle DBA or Oracle documentation. Or experiment outside of DataStage. ...
Ray, you are right! all null reocrds go to
discard file

but datastage takes into account only

1)control file
2)log file
3)parfile and
4)bad file

how to pass the discard file also as a parameter. i have tried APT_ORACLE_LOAD_OPTIONS . but it seems to expect a control file. the job fails with

Code: Select all

Expecting keyword LOAD, found "discard".
any thougths??

regards,
Prabu
prabu
Participant
Posts: 146
Joined: Fri Oct 22, 2004 9:12 am

Post by prabu »

:roll: :roll:
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

I don't currently have access to PX but would imagine that discard file is an optional property of the load stage. If you can find it (in Available Properties to Add), you can use a job parameter to supply its value.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply