sqlrrjdbc

Which format the data should be in to successfully insert it to a table in Netezza DB using RJDBC


I'm trying to insert new rows to an empty table in the DB using dbSendUpdate() from RJDBC package. The fields in the table are as such:

The columns in the data.frame are:

The way I'm doing it, I'm trying to:

I'm exporting the data.frame to csv and try to load it to the DB. Could someone explain the correspondence between R and SQL column types, so they could be inserted to the DB?

The error I'm getting is External table count of bad input rows reached maxerrors limit, although R doesn't give me the info about which column/row causes the problem. I'm not very good with SQL, so I'm not sure where to dig


Solution

  • I figured I had character columns with commas in them. That messed the csv file, as comma symbol was a delimiter, so it was no longer valid. After this was fixed, I was able to upload the data without problems. So I guess my scheme of corresponding types was ok after all