dm_copy_to: Copy a dm-object to a different data source
Description
dm_copy_to() takes a dplyr::src_dbi object or a DBI::DBIConnection object as its first argument
and a dm object as its second argument.
The latter is copied to the former.
By default, temporary tables will be created and the key constraints will be set
(currently only on MSSQL and Postgres databases).
Possible further arguments passed to dplyr::copy_to(), which is used on each table.
overwrite, types, indexes, unique_indexes
Must remain NULL.
set_key_constraints
Boolean variable, if TRUE will mirror dm key constraints on a database.
unique_table_names
Boolean, if FALSE (default), the original table names will be used, if TRUE,
unique table names will be created based on the original table names.
table_names
A named character vector, containing the names that you want the tables in the dm to have
after copying them to the database.
The table names within the dm will remain unchanged.
The name of each element of the vector needs to be one of the table names of the dm.
Those tables of the dm that are not addressed will be called by their original name on the database.
temporary
Boolean variable, if TRUE, only temporary tables will be created.
These tables will vanish when disconnecting from the database.
Value
A dm object on the given src.
Details
No tables will be overwritten; passing overwrite = TRUE to the function will give an error.
Types are determined separately for each table, setting the types argument will
also throw an error.
The arguments are included in the signature to avoid passing them via the
... ellipsis.