Page 1 of 1

Using BEFORE SQL w/user-defined SQL query file with Teradata

Posted: Thu Apr 06, 2006 3:40 pm
by nguyenmk
Hi,

I'm trying to use the user-defined SQL query file in the BEFORE SQL tab with Teradata database (via ODBC). I have a DRS stage that calls the query file as I specifed in the SQL -> Before tab:

FILE=/export/home/test.sql


the test.sql has two delete statements with two semicolons at the end of each statement I also tried with one.

I'm getting the following warning and errors:

Warning: [NCR][ODBC Teradata][Teradata Database] Syntax error: expected something between the beginning of the request and the word 'FILE'.

Error: APT_CombinedOperatorController,0: Fatal Error: SQLExecDirect: Error executing statement 'FILE=/export/home/test.sql(...)

I tested with Oracle db and it works. Am I doing something wrong with the syntax as Teradata db expecting something different? Any idea is greatly appreciated.

Thanks

Michael

Posted: Sun Apr 09, 2006 11:49 pm
by roy
Hi and Welcome aboard :),
:idea: I think this is a question for your Teradata DBA
I wouldn't be surprised that an Oracle syntax is not working on a different DB :!:

Posted: Wed May 31, 2006 12:23 pm
by vinaymanchinila
Hi Roy,
I have an isert statement that works fine outside of DS, but when I try to use it in the before or after tab of Teradata API, it just doesnt seem to be inserting, no warnings , the ids , passwrods connections are the same.

The jobs finish fine, is there a bug or solution for this.

Thanks

Posted: Wed May 31, 2006 4:00 pm
by bcarlson
What is the actual text in the Before tab? From your description, it looks like it actually contains the text:

FILE=/export/home/test.sql

If that is true, then I believe that is your problem. My understanding is that the Before tab is supposed to contain actual SQL, not a file reference.


Brad.

ps. What is the DRS stage? I have not heard of that before. What does it do? How are you using it? Thanks, in advance, for the info!

Posted: Wed May 31, 2006 6:26 pm
by ray.wurlod
DRS is Dynamic RDBMS Stage. It was introduced to allow the likes of PeopleSoft to deploy canned DataStage jobs to their customers; with a DRS you dynamically choose the database connection (e.g. DB2, Oracle, ODBC, SQL Server, etc), perhaps using a job parameter to specify it.

As far as I am aware it is only available in server jobs. It is not mentioned in the Parallel Job Developer's Guide for version 7.5. Neither is it mentioned (either as a server or parallel stage type) in the 7.5 Developer's Help.

Posted: Thu Jun 01, 2006 5:45 am
by vinaymanchinila
Hi,
I am using a SQL and not a file.

Thanks,