Hello everyone,
Teradata (TD henceforth) is throwing a syntax error when using pushdown_sql( ‘DataStore’,’{$GV_WHERE_STMT}’) in the WHERE tab of a query transform. Reason being, TD is not receiving the complete SQL query from DS. Ex: $GV_WHERE_STMT = ‘MY FILTER’;
Error:
5336 7164 DBS-070404 |Data flow XYZ|Reader MNO
5336 7164 DBS-070404 SQL submitted to ODBC data source resulted in error <[Teradata][ODBC Teradata Driver][Teradata Database] Syntax
5336 7164 DBS-070404 error, expected something like a ‘SUCCEEDS’ keyword or a ‘MEETS’ keyword or a ‘PRECEDES’ keyword or an ‘IN’ keyword or a
5336 7164 DBS-070404 ‘CONTAINS’ keyword between the word ‘M’ and ‘;’. >. The SQL submitted is <INSERT INTO BLAH BLAH where M>.
Whatever you put in the global variable, gets chopped after the FIRST character, meaning this is reproducible, at least in our environment. And my need to use pushdown_SQL is justified by the fact that my company does not prefer using ‘SQL Transform’ box, and the where filter is a IN (’’,’’,’’) clause, and the values need to be changeable. Generated optimized SQL looks fine, of course with the GV. No other SQL query, either from a SQL() function in a script or a SQL Transform box is doing this, just the pushdown.
DS Designer: 14.2.3.549
TD: 14.10.06.06
Your time & help is greatly appreciated.
Thanks,
Pavan
kumarbop (BOB member since 2011-01-18)