Teradata / PyTd

A Python Module to make it easy to script powerful interactions with Teradata Database in a DevOps friendly way.
MIT License
108 stars 43 forks source link

Bug in multiple result sets #65

Closed dclong closed 7 years ago

dclong commented 7 years ago

I found that when multiple result sets is returned, the description is not updated after calling the nextset method. For example, I run the following SQL which returns 2 result sets. Table A has 2 columns a and d. After calling the nextset method, the description is not updated (to show only 1 column a). For small data sets, I often convert it to a pandas DataFrame for presentation purpose. Without the correct description information, I could do the conversion.

select * from A; select a from A
escheie commented 7 years ago

This is a bug in the UdaExec cursor wrapper. The underlying tdodbc cursor does update the description when nextset is called. Will put out a new patch with the fix in the next day or two.

dclong commented 7 years ago

That's correct. I found that that teradata.tdodbc works well and have been using it. Thank you very much for fixing the issue!