Dimon D. Dimon D. - 3 months ago 19
R Question

how to export data frame (R) into Oracle table

I need a piece of advice how to transfer data from R into Oracle table.

I have a R-dataframe and I would like to transfer it into the specific Oracle table (the whole dataframe or some columns).

As an option, transfer dataframe which is placed in a csv file via R into Oracle.

I have scanned similar items throughout the inet but not find a clear and plain examples.

Answer

Check the metrod dbWriteTable of the package RJDBC

Here an example

 dbWriteTable(jdbcConnection,"TABLE_NAME",data.frame.name.,   rownames=FALSE, overwrite = TRUE, append = FALSE)

Adjust options as required. For overwrite TRUE a new table is created in the schema of your connection user.