Teradata Python Module - CLOB retrieval issue - when using Teradata ODBC Driver 16.20

Connectivity
Connectivity covers the mechanisms for connecting to the Teradata Database, including driver connectivity via JDBC or ODBC.
Highlighted
New Member

Teradata Python Module - CLOB retrieval issue - when using Teradata ODBC Driver 16.20

I am using Teradata python module to retrieve CLOB output param from a stored procedure in Teradata Database 16.20 database.

The below is my code:

 

udaExec = teradata.UdaExec (appName="Connection_test",version=" ",logConsole=True);
session = udaExec.connect(username="dbc",password="dbc",system="tddemo",method="odbc",MaxSingleLOBBytes="100000",MaxTotalLOBBytesPerRow="100000");
response = session.callproc(myStoredProecdureName,("param1","param2",teradata.OutParam("oMyMsg"),teradata.OutParam("oMyCLOB",size=100000), ));

 

The above works well when I use Teradata ODBC Driver 15.10.
But this gives error when I use Teradata ODBC Driver 16.10 and when the resultant oMyCLOB output param value is greater than 60 KB.

can you please advise how to retrieve CLOB output param from a stored procedure when the CLOB output param returns value greater than 60 KB. I want to retrieve a CLOB value of 290 KB in size.

 

The error is as follows:

May 08 18:29:25.971 ERROR 1892 TDDBCUtility::Error: The Locator is invalid because the response spool has been dropped.
May 08 18:29:25.972 ERROR 1892 TDStatementProcess::Request: MoreResults failed.

May 08 18:29:25.973 ERROR 1892 TDResult::getColDataInfo: ReceiveDeferredLOBMessage execution error
May 08 18:29:25.975 DEBUG 1892 BinaryFile::BinaryFile: Opened file "C:\Program F
iles\Teradata\Client\16.20\ODBC Driver for Teradata\ErrorMessages\en-US\TDMessag
es.xml" with openmode=OPENMODE_READONLY
May 08 18:29:25.975 ERROR 1892 Statement::SQLExecute: [Teradata][ODBC Teradata D
river] (6) Internal Error (Exception).
2019-05-08 18:29:25,976 - teradata.tdodbc - DEBUG - SQLExecute returned non-succ
essful error code -1: [HY000] [Teradata][ODBC Teradata Driver] (6) Internal Erro
r (Exception).
2019-05-08 18:29:25,977 - teradata.udaexec - ERROR - Procedure Failed! Duration:
3.259 seconds, Procedure: GDEV1P_FF.GCFR_FF_TPTLoadCLOB_Generate, Params: ('LD_
001_01_CUSTOMER', 6, 17, 99, 'strDBName', 'userName1', 'password1', 'logMech1',
OutParam(name=oCode, size=-3), OutParam(name=oMessage, size=-3), OutParam(name=o
Script, size=-3), OutParam(name=oParams, size=-3), OutParam(name=oLogon, size=-3
))
Traceback (most recent call last):
File "C:\data\program_files\Python\Python36\lib\site-packages\teradata\udaexec
.py", line 710, in callproc
outparams = self.cursor.callproc(procname, params, **kwargs)
File "C:\data\program_files\Python\Python36\lib\site-packages\teradata\tdodbc.
py", line 579, in callproc
self.execute(query, params, queryTimeout=queryTimeout)
File "C:\data\program_files\Python\Python36\lib\site-packages\teradata\tdodbc.
py", line 604, in execute
self.executemany(query, [params, ], queryTimeout)
File "C:\data\program_files\Python\Python36\lib\site-packages\teradata\tdodbc.
py", line 707, in executemany
checkStatus(rc, hStmt=self.hStmt, method="SQLExecute")
File "C:\data\program_files\Python\Python36\lib\site-packages\teradata\tdodbc.
py", line 231, in checkStatus
raise DatabaseError(i[2], u"[{}] {}".format(i[0], msg), i[0])
teradata.api.DatabaseError: (6, '[HY000] [Teradata][ODBC Teradata Driver] (6) In
ternal Error (Exception).')
2019-05-08 18:29:25,983 - teradata.udaexec - ERROR - Uncaught exception