Closed metanoid closed 2 months ago
Hi @metanoid:
I don't have a Netezza
instance around so shooting from the hip a bit. Do you have the ability to test a development branch? If so, can you see if this version performs better with your mini example?
Thanks
Hi,
Thanks for trying! I think something is missing from the commit. See output message:
devtools::load_all(".")
#>ℹ Loading odbc
#>Error in add_classes_to_exports(ns = nsenv, package = package, exports = exports, :
#> in package ‘odbc’ classes NetezzaSQL were specified for export but not defined
#>In addition: Warning message:
#>package ‘testthat’ was built under R version 4.3.3
Sorry about that @metanoid. Should be better now, hopefully. Let me know what you find.
Thanks again for testing.
It works!
library(DBI)
con <- dbConnect(odbc::odbc(), dsn = "Netezza")
test <- paste0(rep("a", 1000), collapse = "")
inferred_type <- dbDataType(con, test)
#"varchar(1000)"
I'd be interested to hear why this works?
Thanks!
Closed by https://github.com/detule/odbc/commit/7b2dd4be0aebf2e8881eee5b02f07c8e2b6a786e
For a connection of type
NetezzaSQL
, thedbDataType
function returns"VARCHAR(255)"
for seemingly all character vectors, regardless of the number of characters of the longest string in that vectorThis returns:
"VARCHAR(255)"
even though there are clearly more than 255 characters required