Presto {RPresto} | R Documentation |
Connect to a Presto database
Description
Connect to a Presto database
Usage
Presto(...)
## S4 method for signature 'PrestoDriver'
dbConnect(
drv,
catalog,
schema,
user,
host = "localhost",
port = 8080,
source = methods::getPackageName(),
session.timezone = "",
output.timezone = "",
parameters = list(),
ctes = list(),
request.config = httr::config(),
use.trino.headers = FALSE,
extra.credentials = "",
bigint = c("integer", "integer64", "numeric", "character"),
...
)
## S4 method for signature 'PrestoConnection'
dbDisconnect(conn)
Arguments
... |
currently ignored |
drv |
A driver object generated by |
catalog |
The catalog to be used |
schema |
The schema to be used |
user |
The current user |
host |
The presto host to connect to |
port |
Port to use for the connection |
source |
Source to specify for the connection |
session.timezone |
Time zone of the Presto server. Presto returns timestamps without time zones with respect to this value. The time arithmetic (e.g. adding hours) will also be done in the given time zone. This value is passed to Presto server via the request headers. |
output.timezone |
The time zone using which TIME WITH TZ and TIMESTAMP
values in the output should be represented. Default to the Presto
server timezone (use |
parameters |
A |
ctes |
A list of common table expressions (CTEs) that can be used in the
WITH clause. See |
request.config |
An optional config list, as returned by
|
use.trino.headers |
A boolean to indicate whether Trino request headers should be used. Default to FALSE. |
extra.credentials |
Extra credentials to be passed in the X-Presto-Extra-Credential or X-Trino-Extra-Credential header ( depending on the value of the use.trino.headers argument). Default to an empty string. |
bigint |
The R type that Presto's 64-bit integer ( |
conn |
A PrestoConnection object |
Value
Presto A PrestoDriver object
dbConnect A PrestoConnection object
dbDisconnect A logical()
value indicating success
Examples
## Not run:
conn <- dbConnect(Presto(),
catalog = "hive", schema = "default",
user = "onur", host = "localhost", port = 8080,
session.timezone = "US/Eastern", bigint = "character"
)
dbListTables(conn, "%_iris")
dbDisconnect(conn)
## End(Not run)