Page 1 of 1

user-defined sql queries-teradata stage is destination

Posted: Wed Sep 20, 2006 6:32 am
by ssunda6
Hi All,

Can we write user-defined queries in a teradata stage when teradata stage is acting as destination.

I dint find any option as such, but will it be possible if we install any plug-ins?

Thanks and regards,
ssunda

Posted: Wed Sep 20, 2006 7:04 am
by Krazykoolrohit
what kind of queries you talking about? All types of actions that can be possible to a destination is available in the stage. Insert, delete, upsert.

what exactly you want to do?

by default-it is auto-generated query

Posted: Thu Sep 21, 2006 4:02 am
by ssunda6
Hi KrazyKoolRohit,

In the teradata stage, we have options insert,append etc.

But by default, the query is auto-generated.

If I want the following operation to be done,

insert into emp_table(empno_dim,empname,email) values (empnoseq.nextval,empname,email).

empnoseq is a sequencer, how can we mention that sql query in teradata stage. Thats what I meant , when I said user-defined sql query.
Any info regarding this would be helpful

regards,
ssunda

Posted: Thu Sep 21, 2006 7:34 am
by Krazykoolrohit
Where are you trying to generate empnoseq? in teradata? This will be like running a stored proc which cannot be done through this stage. you can use a general ODBC connection to run this wuery on teradata.

I dont have the access to parallel installation right now. so dont take my word for granted.

Re: user-defined sql queries-teradata stage is destination

Posted: Thu Sep 21, 2006 9:20 am
by rwierdsm
ssunda6 wrote:Can we write user-defined queries in a teradata stage when teradata stage is acting as destination.
Hi ssunda,

What type of TD stage are you using?

If it's the enterprise stage, you can specify on your 'Properties' tab, in the 'Connection' branch a 'DB Options Mode' property. Set this to 'User-defined' and you can enter a user defined SQL.

If it's the MultiLoad stage, on the 'MultiLoad' tab change 'Load Type' to 'Custom'. This will enable the 'Custom' tab on the 'Script' tab. You can put custom SQL in the 'Custom Script', press the 'Generate Sample' button to get a sample. View the help for this screen for more info.

All of this assumes, of course, that you are using the Parallel edition as your profile suggests.

Rob W

Posted: Thu Sep 21, 2006 9:26 am
by keshav0307
Yes, you can use Teradata API stage plugin.... if you don't have it get it from ascential and register the plugin..

Posted: Sun Sep 24, 2006 11:43 pm
by ssunda6
Thanks for the replies. I will check with the options and update you again.

regards,
ssunda.