output value from a job as input of a user variable activity

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
farkney
Participant
Posts: 2
Joined: Wed Dec 09, 2009 3:49 am

output value from a job as input of a user variable activity

Post by farkney »

Good morning everybody,

is there a solution and maybe an example, how to process a delta of data records which can be identified by a timestamp?
There is the situation that the source table gets every day some new records, with the timestamp of the DB insertion. My idea was that I write the highest timestamp of the last run to a database table and before every run I collect this timestamp and put it as low value in the where part of the select statement. But I miss a way how to make that value available as output of a job, make it available to a sequence and have it available as input of a user variable activity.
Are there any hints how to get this solved?
There is a solution doing that with a shell script, but I like to know how to do that just in DataStage.

Thank you very much for your help
Best Regards
Frank
biju.chiramel
Participant
Posts: 5
Joined: Mon Oct 29, 2007 9:55 pm
Location: Mumbai

Re: output value from a job as input of a user variable acti

Post by biju.chiramel »

According to me...
Option 1. store the timestamp of run in a hashfile.
pull all the data from source.
filter with hash value and propagate only new records.

Option 2. Store timestamp in hashfile
create routine to read the hashfile and output the value.
call this routine in Routine Activity.
Pass the value to Job Activity and use in WHERE condition.
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post by Sainath.Srinivasan »

Search for SetUserStatus.

Works in Server edition.

For PX, the date is accessed from the table using a join or something similar.

Generally people use server edition work to get the values and pass to PX jobs.
Post Reply