Problem of Teradata task

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
yulangok
Participant
Posts: 9
Joined: Sun May 27, 2007 9:37 pm

Problem of Teradata task

Post by yulangok »

Hello every one:
I have a task to finish. I want to drop a teradata table and want to use datastage to finish this task.
My server is in unix and the brand is 7.5.2. Please tell me which datastage I should select and tell me more detail.
Many thanks!
Krazykoolrohit
Charter Member
Charter Member
Posts: 560
Joined: Wed Jul 13, 2005 5:36 am
Location: Ohio

Post by Krazykoolrohit »

try passing a Drop table command using teradata enterprise state (user defined SQL). you will have to have a dummy file (with dummy column and one dummy row) as source.

I have never tried this, but i dont see why this wont work.
yulangok
Participant
Posts: 9
Joined: Sun May 27, 2007 9:37 pm

Post by yulangok »

I have designed a job, and using Teradata Enterprise stage as source. In this stage I defined a SQL (Select * from (Select 'aa' AS AA) t1)to post data flow, and a SQL (DELETE FROM CBS_AGDMX)to delete the table. It can work when I union the two SQL sentences. But my final aim is droping the table. As I change the SQL(DELETE FROM CBS_AGDMX) as (Drop table CBS_AGDMX) it does not work. And I also try it on the teradata celint, which does not work. So my friends, can you give me a way?
Krazykoolrohit
Charter Member
Charter Member
Posts: 560
Joined: Wed Jul 13, 2005 5:36 am
Location: Ohio

Post by Krazykoolrohit »

When you say does not work, what does it do. does it give you an error? you can also write a script and call through before/after subroutine.
toshea
Participant
Posts: 79
Joined: Thu Aug 14, 2008 6:46 pm

Post by toshea »

You might try using the Teradata API stage instead of Teradata Enterprise, since the Teradata API stage doesn't use a utility slot and doesn't have the overhead of connecting multiple sessions at startup. Teradata Enterprise is overkill for what you want to do.

If you don't see the Teradata API stage in the default palette, you can still drag it from Stage Types->Parallel->Database->Teradata in the repository view. Specify your DROP TABLE statement in the Before or After SQL tab.
Post Reply