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
dsuk
Participant
Posts: 9 Joined: Thu Oct 23, 2008 12:49 am
Post
by dsuk » Sun Nov 23, 2008 11:22 pm
Hi,
there is one job which is running frequently and generating file in target. my requirement is how to suffix timestamp with the file name.
Example:
file_name_2008_11_24_12_49_14
that means filename_yyyy_mm_dd_hh_mn_ss format.
thanks in advance
hamzaqk
Participant
Posts: 249 Joined: Tue Apr 17, 2007 5:50 am
Location: islamabad
Post
by hamzaqk » Mon Nov 24, 2008 12:26 am
Teradata Certified Master V2R5
John Smith
Charter Member
Posts: 193 Joined: Tue Sep 05, 2006 8:01 pm
Location: Australia
Post
by John Smith » Mon Nov 24, 2008 12:59 am
You just need to pass in the timestamp as a Job parameter and reference that in your file stage.
dsuk
Participant
Posts: 9 Joined: Thu Oct 23, 2008 12:49 am
Post
by dsuk » Tue Nov 25, 2008 9:52 pm
need to suffix timestamp in the file name as the job finish timestamp.
dsuk
Participant
Posts: 9 Joined: Thu Oct 23, 2008 12:49 am
Post
by dsuk » Tue Nov 25, 2008 9:54 pm
Need to suffix timestamp in the file name as the job finish timestamp.
chulett
Charter Member
Posts: 43085 Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO
Post
by chulett » Tue Nov 25, 2008 10:04 pm
Then you'll need to do it "after job". Write to a static name and add the timestamp after the job finishes.
-craig
"You can never have too many knives" -- Logan Nine Fingers
dsuk
Participant
Posts: 9 Joined: Thu Oct 23, 2008 12:49 am
Post
by dsuk » Wed Nov 26, 2008 10:07 pm
my problem is to name the file as per the finish timestamp of the job.
lets say job finished at 11/26/2008 3:34:11 PM. so my file name should be like filename_11_26_2008_3_34_11_PM. the timestamp is dynamic so we can't pass the timestamp as the parametere in the job properties.
Regards,
dsuk
chulett
Charter Member
Posts: 43085 Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO
Post
by chulett » Thu Nov 27, 2008 12:09 am
Understood. Suggestion was to use the current time, not a Job Parameter. A script called "after job" could easily do this.
-craig
"You can never have too many knives" -- Logan Nine Fingers