turbodbc
turbodbc copied to clipboard
Support for SQL_GUID type
Querying a MS SQL Server table that has a SQL_GUID type column will make turbodbc raise a RuntimeError:
File "/Users/Dirkjonker/venv/lib/python3.5/site-packages/turbodbc/exceptions.py", line 31, in wrapper
return f(*args, **kwds)
File "/Users/Dirkjonker/venv/lib/python3.5/site-packages/turbodbc/cursor.py", line 72, in execute
self.impl.execute()
RuntimeError: Error! Unsupported type identifier '-11'
$ grep "(-11)" /usr/local/include/sql*.h
/usr/local/include/sqlext.h:#define SQL_GUID (-11)
For our use case, returning the GUID as a string or bytestring would be sufficient.
This seems related to #56.
It would be even better if turbodbc returned a proper Python UUID though.
Hello, I am curious is there any traction in the pipeline for resolving this issue in an upcoming version release?
Hi Kyle! Traction was a bit low in the recent past. This was mostly because I as the main contributor became a father and switched positions. I expect to spend more time on turbodbc in the future. Fixing bugs/compatibility issues and adding support for more data types such as SQL_GUID
is at the top of my mental list.
Hi Michael, thank you for getting back to me. I appreciate your time and effort in the open source contributions of turbodbc. Looking forward to future updates.
I been using turbodbc for creating parquet from sql server, the non support sql_guid seems a big road block on my work, Is this feature being actively pursued?
Hi! I have been planning to add support for more data types for more than a year now, but my time is rather limited, currently.
A pull request would require:
- extending the type enum
- add read/write support for plain Python objects
- add read/write support for NumPy frontend
- add read/write support for Arrow frontend
@dirkjonker I have the same issue. As a workaround you can always cast the GUID to a string as a part of the SQL query. Then cast it back to a UUID when you process the result set in your code. Not ideal, but it gets us around the roadblock in the interim. Good luck!
And Michael, thanks again for your time and effort on turbodbc!!
Thank you.
On Jan 30, 2019, at 11:04 AM, tmitrovich [email protected] wrote:
@dirkjonker https://github.com/dirkjonker I have the same issue. As a workaround you can always cast the GUID to a string as a part of the SQL query. Then cast it back to a UUID when you process the result set in your code. Not ideal, but it gets us around the roadblock in the interim. Good luck!
And Michael, thanks again for your time and effort on turbodbc!!
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/blue-yonder/turbodbc/issues/65#issuecomment-459000648, or mute the thread https://github.com/notifications/unsubscribe-auth/Ah0Mefne67xbPldBVX6cXXrgWSFWBu0lks5vIcKLgaJpZM4Mm0Fr.
I was trying to pull around 10000 rows x 20 columns records from Microsoft SQL Server using turbodbc. But I've received below error response.
Unsupported type identifier for column LINE_PK @ SQL_GUID (precision 36, scale 0)