How to run these commands in Datastage for Teradata.

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
xinhuang66
Participant
Posts: 161
Joined: Wed Aug 02, 2006 4:30 am

How to run these commands in Datastage for Teradata.

Post by xinhuang66 »

For some purpose, I need to run below three commands in Datastage aftere a job for Teradata data loading .

collect stats on Schema.Table1 column column1;
collect stats on Schema.Table2 column column2;
collect stats on Schema.Table3 column column3;

Apart from put them into a command file, and run it from command line, is there any other way for us to run them.

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

Post by ray.wurlod »

Why do you need to run them "in DataStage"?

DataStage is an ETL tool, not a reporting tool.

Run them in a script, under control of a job sequence if needed. You can retrieve the output from the script within the job sequence and do whatever you like with it afterwards.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
vmcburney
Participant
Posts: 3593
Joined: Thu Jan 23, 2003 5:25 pm
Location: Australia, Melbourne
Contact:

Post by vmcburney »

For some actions the Teradata Enterprise stage lets you put in a Before-SQL and an After-SQL statement that runs at the start of end of the DataStage job (not for every row). You might be able to use the After-SQL tab to update stats.
xinhuang66
Participant
Posts: 161
Joined: Wed Aug 02, 2006 4:30 am

Post by xinhuang66 »

In Enterprise stage, it is called open command , close command, while in other teradata stage, it is before and after sql.

I tried that, and it looks like that DS couldn't recognize these commands.

thanks
BradJoss
Premium Member
Premium Member
Posts: 10
Joined: Thu Jun 04, 2009 9:37 am
Location: Winnipeg, Manitoba, Canada

Post by BradJoss »

xinhuang66 wrote:In Enterprise stage, it is called open command , close command, while in other teradata stage, it is before and after sql.

I tried that, and it looks like that DS couldn't recognize these commands.

thanks
I know this is an old thread but I had to do this (company direction is not to mix DataStage and Scripts) as well and anyone that comes across this might like to know the answer. What I had to do was to issue one collect statistics statement then follow it with a COMMIT; then repeat the pattern.
Post Reply