| dbCreateTable,TrinoConnection-method | R Documentation |
Trino has no temporary tables, so temporary = TRUE is an error rather
than being silently ignored.
## S4 method for signature 'TrinoConnection'
dbCreateTable(conn, name, fields, ..., row.names = NULL, temporary = FALSE)
conn |
A TrinoConnection object. |
name |
Table name, in any form |
fields |
Either a named character vector of Trino types, one per
column, or a data frame whose columns' R types are mapped to Trino
types with |
... |
Unused, for compatibility with the generic. |
row.names |
Unused: RTrino never writes row names as a column. |
temporary |
Must be |
TRUE, invisibly.
con <- DBI::dbConnect(RTrino::Trino(), host = Sys.getenv("RTRINO_TEST_URL"),
catalog = "memory", schema = "default")
DBI::dbCreateTable(con, "sales", c(id = "bigint", label = "varchar"))
DBI::dbListFields(con, "sales")
DBI::dbRemoveTable(con, "sales")
# The column types can also follow a data frame's
DBI::dbCreateTable(con, "sales", data.frame(id = 1L, label = "a"))
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.