I am having issues with pushing data with NA
values in Oracle using the dbWriteTable()
, which comes from R's DBI
package. When I try to upload this data frame to the desired oracle database, I get an error message saying:
Error in .local(conn, statement, ...) :
execute JDBC update query failed in dbSendUpdate (NaN)
I noticed that when I upload the first row of this data frame, I have no problems, though if I try to upload two or more rows in the data frame, I get this error message. There are no NaN
or Inf
values in this data frame. There are only character and numeric variables and certain numeric variables contain NA
values.
X1 | X2 |
---|---|
NA | 5 |
2 | 6 |
3 | 7 |
4 | 8 |
The table above is an example of a table that will return the error message. If I were to upload only the first row of this table, everything works properly, and the first row is outputted into the Oracle database.
My thought is that there is a bug in the dbWriteTable()
function that I cannot get around by continuing to use it. Does anyone know of a way that I can fix this issue, or if there are any other methods that I use to complete my task?
Code:
dbWriteTbale(conn = jdbcConnection,name = "test", value = test, row.names=FALSE, append=FALSE, overwrite=FALSE)
My session info is below.
R version 4.1.0 (2021-05-18)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows Server 2012 R2 x64 (build 9600)