copy_inline: Use a local data frame in a dbplyr query
Description
This is an alternative to copy_to() that does not need write access and
is faster for small data.
Usage
copy_inline(con, df, types = NULL)
Value
A tbl_lazy.
Arguments
con
A database connection.
df
A local data frame. The data is written directly in the SQL query
so it should be small.
types
A named character vector of SQL data types to use for the columns.
The data types are backend specific. For example for Postgres this could
be c(id = "bigint", created_at = "timestamp", values = "integer[]").
If NULL, the default, the types are determined from df.
Details
It writes the data directly in the SQL query via the VALUES clause.
See Also
copy_to() to copy the data into a new database table.