| dbAppendTable,TrinoConnection-method | R Documentation |
Builds one INSERT INTO ... VALUES (...) statement per batch of rows,
with values quoted as literals by DBI::sqlAppendTable() (which calls
dbQuoteIdentifier() and dbQuoteLiteral() for Trino) — there is no
parameter binding to fall back on.
## S4 method for signature 'TrinoConnection'
dbAppendTable(conn, name, value, ..., row.names = NULL)
conn |
A TrinoConnection object. |
name |
Table name, in any form |
value |
A data frame with the rows to insert. |
... |
Takes |
row.names |
Unused: RTrino never writes row names as a column. |
The number of rows inserted.
con <- DBI::dbConnect(RTrino::Trino(), host = Sys.getenv("RTRINO_TEST_URL"),
catalog = "memory", schema = "default")
DBI::dbCreateTable(con, "sales", c(id = "integer", label = "varchar"))
DBI::dbAppendTable(con, "sales", data.frame(id = 1:3, label = letters[1:3]))
DBI::dbGetQuery(con, "SELECT * FROM sales ORDER BY id")
DBI::dbRemoveTable(con, "sales")
DBI::dbDisconnect(con)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.