Links
Comment on page

Reference

Overview

The redivis R library provides an interface to construct representations of Redivis entities and to read from them.
Resources are generally constructed by chaining together multiple constructor methods, reflecting the hierarchical nature of entities in Redivis. For example, to get the tidyverse tibble for a table (which belongs to a dataset in an organization), we would write:
library(redivis)
df <- (
redivis::organization("Demo") # Returns an instance of an Organization
$dataset("CMS 2014 Medicare Data") # Returns an instance of a Dataset
$table("nursing_facilities") # Returns an instance of a Table
$to_tibble() # Retuns a tibble for that table
)

Interfaces

redivis
The redivis namespace. Provides constructor methods for most of the other classes.
Dataset
Class representing a Redivis dataset. Provides constructor methods for Tables and Queries scoped to a given dataset.
File
Class representing a non-tabular file on Redivis.
Class representing a Redivis organization. Provides constructor methods for Datasets and Projects scoped to a given organization.
Project
Class representing a Redivis project. Provides constructor methods for Tables and Queries scoped to a given project.
Query
Class representing a running SQL query that references tables on Redivis.
Table
Class representing a Redivis table. Numerous methods available for reading data from the table.
User
Class representing a Redivis user. Provides constructor methods for Datasets and Projects scoped to a given user.

Environment variables

The following environment variables may be set to modify the behavior of the redivis-r client.

REDIVIS_DEFAULT_PROJECT

If set, tables referenced via redivis::table() and unqualified table names in redivis::query() will be assumed to be within the default project.
Takes the form user_name.project_name. All notebooks on Redivis automatically set the default project to that notebook's project.

REDIVIS_DEFAULT_DATASET

If set, tables referenced via redivis::table() and unqualified table names in redivis::query() will be assumed to be within the default dataset.
Takes the form owner_name.project_name. If both a default dataset and project are set, the default project will supersede the dataset.

REDIVIS_API_TOKEN

If using this library in an external environment, you'll need set this env variable to your API token in order to authenticate.
Important: this token acts as a password, and should never be inlined in your code, committed to source control, or otherwise published.