Exception:
Caused by: java.lang.NullPointerException
at com.teradata.tdgss.jtdgss.TdgssConfigApi.GetMechanisms(Unknown Source)
at com.teradata.tdgss.jtdgss.TdgssManager.<init>(Unknown Source)
at com.teradata.tdgss.jtdgss.TdgssManager.<clinit>(Unknown Source)
Brief:
tdgssconfig.jar can't be found on the classpath. Please add same on classpath.
Exception:
java.sql.SQLException: [Teradata Database] [TeraJDBC 15.10.00.33] [Error 3707] [SQLState 42000] Syntax error, expected something like a name or a Unicode delimited identifier or an 'UDFCALLNAME' keyword or '(' between the 'FROM' keyword and the 'SELECT' keyword.
Brief:
Normally Spark JDBC expects DBTable property to be a Table Name. So, internally it prepends "select * from" to Table Name. Like
select * from <Table Name>
But, If we specify SQL instead of Table Name then internally SQL will become something like:
select * from select ... ;
Above makes it syntactically incorrect leading to above error. Solution is to provide subquery with an alias such that it will make internal SQL syntactically correct.
select * from (select ...) alias
Comments
Post a Comment