Guest User

Untitled

a guest
Nov 16th, 2018
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. I am getting an error, below is the sample code. Any help is appreciated.
  2.  
  3.  
  4. import teradata
  5. import xlrd
  6.  
  7. udaExec = teradata.UdaExec (appName="HelloWorld", version="1.0",
  8. logConsole=False)
  9.  
  10. session = udaExec.connect(method="odbc", system="abc",
  11. username="abc", password="xyz",authentication="abc",driver="Teradata");
  12.  
  13.  
  14.  
  15. loc = ("//")
  16.  
  17. wb = xlrd.open_workbook(loc)
  18. wbsheet=wb.sheet_by_name("Queries")
  19. total_rows=wbsheet.nrows
  20.  
  21.  
  22.  
  23. print(total_rows)
  24.  
  25. query_list=[]
  26.  
  27. for row1 in range(0,total_rows):
  28. exceldata = wbsheet.row(row1)
  29. query_list.append(exceldata)
  30.  
  31.  
  32. for row2 in query_list:
  33. session.execute(row2)
Add Comment
Please, Sign In to add comment