Default value problem

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
srinivas143
Participant
Posts: 30
Joined: Tue Feb 19, 2008 11:02 pm

Default value problem

Post by srinivas143 »

Hi All,

I need to default a value for a particular column into the target table based on the job status

As part of the job design I need to populate only this field,No other fields were not required as its just the status.

eg: 'The latest data was not available in the system'


Help me how to proceed to populate this single field hardcoded value into the target.


Kind Regards
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Just... update it. :? You'll need to supply something in the way of 'key' information so the job knows what record to update. What part are you having problems with? What job status are we discussing here? How will you check / pass it?

Do you have anything like a specific question?
-craig

"You can never have too many knives" -- Logan Nine Fingers
srinivas143
Participant
Posts: 30
Joined: Tue Feb 19, 2008 11:02 pm

Post by srinivas143 »

Hi,

I need to check the file status using 'Wait for file activity'

If the file is available ..I will process the logic.


If the file is not available I nedd to insert a record into the error table by logging 'File is not available use previous day's data'
for that I need to desing the job without source...just to hard code this message.


Kind Regards
srinivas143
Participant
Posts: 30
Joined: Tue Feb 19, 2008 11:02 pm

Post by srinivas143 »

Hi,

I need to check the file status using 'Wait for file activity'

If the file is available ..I will process the logic.


If the file is not available I nedd to insert a record into the error table by logging 'File is not available use previous day's data'
for that I need to desing the job without source...just to hard code this message.


Kind Regards
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

So a failure trigger from the WFF stage to the job in question. I believe you can use a Column Generator as the first stage in your 'sourceless' job to generate the static value you need.
-craig

"You can never have too many knives" -- Logan Nine Fingers
srinivas143
Participant
Posts: 30
Joined: Tue Feb 19, 2008 11:02 pm

Post by srinivas143 »

Thank you craig...

I used in the following manner...

Row generator->Transformer->Target

Is this is the way......so that I can set a flag and default the value??



Kind Regards
srinivas143
Participant
Posts: 30
Joined: Tue Feb 19, 2008 11:02 pm

Post by srinivas143 »

Thank you craig...

I used in the following manner...

Row generator->Transformer->Target

Is this is the way......so that I can set a flag and default the value??



Kind Regards
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Right, sorry - Row Generator, that should be fine. Make sure it only generates 1 row, however.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply