copy_inline | R Documentation |
This is an alternative to copy_to()
that does not need write access and
is faster for small data.
copy_inline(con, df, types = NULL)
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 |
It writes the data directly in the SQL query via the VALUES
clause.
A tbl_lazy
.
copy_to()
to copy the data into a new database table.
df <- data.frame(x = 1:3, y = c("a", "b", "c"))
con <- DBI::dbConnect(RSQLite::SQLite(), ":memory:")
copy_inline(con, df)
copy_inline(con, df) %>% dplyr::show_query()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.