You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to create procedure on Teradata using turbodbc. There is my sample code:
import turbodbc
with turbodbc.connect(dsn="my_dsn") as con:
with con.cursor() as cur:
cur.execute("""create procedure dev.test_procedure ()
sql security invoker
begin
delete dev.test_table ;
end ;
""")
But, the same code works with no errors in Teradata SQL Assistant.
Also, this code works fine if I use teradatasql:
import teradatasql
with teradatasql.connect(
'{"host":"my_host","user":"my_user","password":"my_password"}'
) as con:
with con.cursor() as cur:
cur.execute("""create procedure dev.test_procedure ()
sql security invoker
begin
delete dev.test_table ;
end ;
""")
The text was updated successfully, but these errors were encountered:
I'm not too familiar with Teradata (or teradatasql for that matter). My first gut feeling is that the teradatasql package maybe performs some tokenization / sql parsing or some kind of preprocessing (e.g. stripping whitespaces, etc.) which we do not do. Can you try it with an even simpler statement?
I'm trying to create procedure on Teradata using turbodbc. There is my sample code:
I have got this error:
But, the same code works with no errors in Teradata SQL Assistant.
Also, this code works fine if I use teradatasql:
The text was updated successfully, but these errors were encountered: