I am strugling to connnect teradata usning python. I have a user ID and password in text file and i need to read the test file to connect to teradata.. could you please help me with theb syntax if anyone has already done this
So I spent a good few hours trying to figure this one out a couple weeks back... What type of driver are you trying to use and which python package are you using? I found pyodbc to be the easiest to get up and running.
I have written a Python extension library which connect Teradata via CLIv2. You can try to use it.
Note: This is not a Teradata product, so there is no support service. But you can modify the source code freely if you want.
you shall use this:
There is now an open source Teradata python module available:
Hi Eric, thanks for previous query reply regarding CLOB large dataSet reutrn, you advised to use size param in OutParam to specify the output param size.
Now i have two queries.
Query1: I get this "WARNING WARNING - 1 open connections found on exit, attempting to close.." on teradata module suggested to use "with" clause to explicitly close the connection, but that closes just after first query and i need it be opened till end of script and i should close it my self? how can we get the control to close the connection, cursor and session etc. An example script will help alot.
Query2: Called SP CLOB can return upto 2GB data and i tested the below script till 177011324 (Chars) at this size or greater size memory error reported in python log. Can you tell what maximum return from CLOB this python module can consume or how can we allocate a large memory to the script?
Below is my py script, and SP Definition.
SP Definition is below.
REPLACE PROCEDURE GDEV1P_FF.GCFR_FF_TPTLoadCLOB_Generate
@Eric. the python for above 2nd query is this below ONE.