src_presto: dplyr integration to connect to a Presto database.

Description Usage Arguments Examples

View source: R/src.presto.R

Description

Allows you to connect to an existing database through a presto connection.

Use src_presto to connect to an existing database, and tbl to connect to tables within that database. If you're unsure of the arguments to pass, please ask your database administrator for the values of these variables.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
src_presto(
  catalog = NULL,
  schema = NULL,
  user = NULL,
  host = NULL,
  port = NULL,
  source = NULL,
  session.timezone = NULL,
  parameters = NULL,
  ...
)

tbl.src_presto(src, from, ...)

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

...

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.

src

A presto src created with src_presto.

from

Either a string giving the name of table in database, or sql described a derived table or compound join.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## Not run: 
# To connect to a database
my_db <- src_presto(catalog = "hive", schema = "web", user = "onur",
  host = "localhost", port = 8888, session.timezone='Asia/Kathmandu')

## End(Not run)
## Not run: 
First create a database connection with src_presto, then reference a tbl
within that database
my_tbl <- tbl(my_db, "my_table")

## End(Not run)

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