Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dbWriteTable uses BIT datatype instead of BOOL #849

Closed
metanoid opened this issue Sep 27, 2024 · 2 comments · Fixed by #850
Closed

dbWriteTable uses BIT datatype instead of BOOL #849

metanoid opened this issue Sep 27, 2024 · 2 comments · Fixed by #850

Comments

@metanoid
Copy link

When the dbms.name is NetezzaSQL then dbWriteTable should write a logical TRUE/FALSE data column as type BOOL as per this list of supported data types: https://www.ibm.com/docs/en/netezza?topic=vc-data-types-aliases

Instead, it seems to be trying to use the BIT datatype, which is not supported by Netezza.

Example:

a = data.frame(Test = runif(100) > 0.5)
dbWriteTable(n_con, "TEST_DELETE", a)

results in

Error in `dbWriteTable()`:
! ODBC failed with error HY000 from .ERROR: transformColumnType: error reading type 'BIT'<SQL> 'CREATE TABLE "TEST_DELETE" (
•  "Test" BIT
• )
'
@detule
Copy link
Collaborator

detule commented Sep 27, 2024

Thanks!

Would you be willing, once again to help us test?

https://github.com/detule/odbc/tree/netezza/odbcDataType_bool

Thanks again

@metanoid
Copy link
Author

Working, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants