Page 1 of 1

How to drop Teradata Work Tables automatically

Posted: Fri Sep 29, 2006 11:55 am
by chrisjones
Hi Frineds ,
My Job is creating work tables while loading data into Taeradata after every run in my database ,so how to avoid this or how to drop after every DS Job run.

Posted: Fri Sep 29, 2006 1:06 pm
by ccatania
For a normal run you can specify to have your error tables drop, this is in the script portion-Before-of the Teradata stage. The work files are created when you have a abend, which someone must address. In my office since we are paged to address abends, we manually delete the error and work tables after seeing the error. Part of the recovery procedure.

Posted: Fri Sep 29, 2006 3:58 pm
by ray.wurlod
Create a script to drop the tables and execute this in a job sequence after the Job activity that runs the job. If there is an unconditional trigger from the Job activity to this Execute Command activity, the tables will be dropped irrespective of the status of the job (which may be inconvenient for troubleshooting).

How to drop Teradata Work Tables automatically

Posted: Fri Sep 29, 2006 4:18 pm
by chrisjones
Thanks for your info..
Please let me know how to drop as they are generated with different names at run time..so how to capture them and delete.
ray.wurlod wrote:Create a script to drop the tables and execute this in a job sequence after the Job activity that runs the job. If there is an unconditional trigger from the Job activity to this Execute Command acti ...

Posted: Fri Sep 29, 2006 4:33 pm
by ray.wurlod
No idea. Depends on how the names were generated. If you can, store the names somewhere (a file?) in the job that creates them, and pick them up from there in the script. Basically, you need some mechanism for transmitting the table names back to the job sequence (or generating them there in the first place). Another possibility is to query the system tables based on date/time created.