dbConnect-Data.WorldDriver-method: Connect to a dataset like it's a database.

Description Usage Arguments Value Note Examples

Description

Connect to a dataset like it's a database.

Usage

1
2
## S4 method for signature 'Data.WorldDriver'
dbConnect(drv, dataset, ...)

Arguments

drv

A Data.Worldriver object, created by Data.World().

dataset

The name of a data.world dataset. E.g., "johndoe/pet_store".

Value

A "handle" in the form of Data.WorldConnection object.

Note

Even though it doesn't make an API call, this function will throw an error if your data.world API token has not been configured. See configure. This ensures that any subsequent queries sent over this connection will work.

Since data.world queries are done via API call, and there's no persistent connection, this function really just holds some basic parameters that are necessary for making API calls related to the dataset.

Examples

1
2
3
4
5
## Not run: 
conn <- dbConnect(Data.World(), dataset='johndoe/petstore')
dbGetQuery(conn, "SELECT * FROM pets WHERE species = 'dog'")

## End(Not run)

carljv/dwDBI documentation built on May 4, 2019, 7:36 a.m.