Copy data frames to database tables
Writes, overwrites or appends a data frame to a database table, optionally
converting row names to a column and specifying SQL data types for fields.
New code should prefer dbCreateTable() and dbAppendTable().
## S4 method for signature 'DatabaseConnectorConnection,character,data.frame' dbWriteTable( conn, name, value, overwrite = FALSE, append = FALSE, temporary = FALSE, oracleTempSchema = NULL, ... )
conn |
A DBIConnection object, as returned by
|
name |
A character string specifying the unquoted DBMS table name,
or the result of a call to |
value |
a data.frame (or coercible to data.frame). |
overwrite |
Overwrite an existing table (if exists)? |
append |
Append to existing table? |
temporary |
Should the table created as a temp table? |
oracleTempSchema |
Specifically for Oracle, a schema with write privileges where temp tables can be created. |
... |
Other parameters passed on to methods. |
dbWriteTable() returns TRUE, invisibly.
If the table exists, and both append and overwrite arguments are unset,
or append = TRUE and the data frame with the new data has different
column names,
an error is raised; the remote table remains unchanged.
An error is raised when calling this method for a closed
or invalid connection.
An error is also raised
if name cannot be processed with dbQuoteIdentifier()
or if this results in a non-scalar.
Invalid values for the additional arguments row.names,
overwrite, append, field.types, and temporary
(non-scalars,
unsupported data types,
NA,
incompatible values,
duplicate
or missing names,
incompatible columns)
also raise an error.
Other DBIConnection generics:
DBIConnection-class,
dbAppendTable(),
dbCreateTable(),
dbDataType(),
dbDisconnect(),
dbExecute(),
dbExistsTable(),
dbGetException(),
dbGetInfo(),
dbGetQuery(),
dbIsReadOnly(),
dbIsValid(),
dbListFields(),
dbListObjects(),
dbListResults(),
dbListTables(),
dbReadTable(),
dbRemoveTable(),
dbSendQuery(),
dbSendStatement()
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.