I'm using the teradatasql python module and i'm unable to find in documentation on how to pass named parameters into the cursor.execute()
i have stored procedure which takes IN
parameter , but in teradatasql i dont see option to pass column name. is there any way to do this?
here is some snippet of my PROC which takes IN
parameters
(
IN transId VARCHAR(50),
IN name VARCHAR(50),
IN add VARCHAR(50),
IN zip VARCHAR(50),
IN area VARCHAR(50)
)
code
with teradatasql.connect ('{"host":"whomooz","user":"guest","password":"please"}') as con:
with con.cursor () as cur:
cur_execute (cur, "{call examplestoredproc (?, ?)}", [10, 7]) # bound parameter values
def cur_execute (cur, sSQL, params=None):
print ()
print ("cur.execute", sSQL, "bound values", params)
cur.execute (sSQL, params)