Presto: Connect to a Presto database

Description Usage Arguments Value Examples

View source: R/Presto.R

Description

Connect to a Presto database

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
Presto(...)

## S4 method for signature 'PrestoDriver'
dbConnect(
  drv,
  catalog,
  schema,
  user,
  host = "localhost",
  port = 8080,
  source = getPackageName(),
  session.timezone = "UTC",
  parameters = list(),
  ...
)

## S4 method for signature 'PrestoConnection'
dbDisconnect(conn)

Arguments

...

currently ignored

drv

A driver object generated by Presto

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 to use for the connection. 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. See the session.timezone tests for examples.

parameters

A list of extra parameters to be passed in the ‘X-Presto-Session’ header

conn

A PrestoConnection object

Value

[Presto] A PrestoDriver object

[dbConnect] A PrestoConnection object

[dbDisconnect] A logical value indicating success

Examples

1
2
3
4
5
6
7
8
## Not run: 
  conn <- dbConnect(Presto(), catalog = 'hive', schema = 'default',
                    user = 'onur', host = 'localhost', port = 8080,
                    session.timezone='US/Eastern')
  dbListTables(conn, '%_iris')
  dbDisconnect(conn)

## End(Not run)

RPresto documentation built on Sept. 5, 2021, 5:34 p.m.