dplyr integration to connect to a Presto database.
dplyr integration to connect to a Presto database.
Allows you to connect to an existing database through a presto connection.
src_presto( catalog =NULL, schema =NULL, user =NULL, host =NULL, port =NULL, source =NULL, session.timezone =NULL, parameters =NULL, bigint = c("integer","integer64","numeric","character"), con =NULL,...)
Arguments
catalog: Catalog to use in the connection
schema: Schema to use in the connection
user: User name to use in the connection
host: Host name to connect to the database
port: Port number to use with the host name
source: Source to specify for the connection
session.timezone: Time zone for the connection
parameters: Additional parameters to pass to the connection
bigint: The R type that Presto's 64-bit integer (BIGINT) types should be translated to. The default is "integer", which returns R's integer type, but results in NA for values above/below +/-2147483647. "integer64" returns a bit64::integer64 , which allows the full range of 64 bit integers. "numeric" coerces into R's double type but might result in precision loss. Lastly, "character" casts into R's character type.
con: An object that inherits from PrestoConnection , typically generated by DBI::dbConnect . When a valid connection object is supplied, Other arguments are ignored.
...: For src_presto other arguments passed on to the underlying database connector dbConnect. For tbl.src_presto, it is included for compatibility with the generic, but otherwise ignored.
Examples
## Not run:# To connect to a databasemy_db <- src_presto( catalog ="memory", schema ="default", user = Sys.getenv("USER"), host ="http://localhost", port =8080, session.timezone ="Asia/Kathmandu")# Use a PrestoConnectionmy_con <- DBI::dbConnect( catalog ="memory", schema ="default", user = Sys.getenv("USER"), host ="http://localhost", port =8080, session.timezone ="Asia/Kathmandu")my_db2 <- src_presto(con = my_con)## End(Not run)