dbGetQuery in R truncates really long the SQL query (of length 10564 characters) -
i have been trying execute long sql query , result data frame in r. following line throws error , displays partial query in console (truncates it)
my_dataframe <- dbgetquery(conn, my_large_query)
the length of query 10564 characters use lot of ctes. have removed string truncation via options menu in r studio wonder if there character limitation in dbgetquery
function in r?
any suggestions?
- rdmbs: db2 (on ibm as400),
- r package: dbi (library - rjdbc)
you mentioned changing 'string truncation', how warning.length
?
options("warning.length"={integer})
i'd suggest test query out first in whatever gui available database. when verify there's no problem query, run in r.
when dbgetquery (assuming dbi package) throws sql/database error, actual content of error won't shown until after full text of query. in other words, if query text being truncated in r error output, database error code/text coming not visible @ all. issue may extremely simple unmatched bracket or missing comma.
please note whether error message starts error in dbgetquery
(r issue) or error in .verify.jdbc.result
(database issue).
Comments
Post a Comment