| Title: | R interface for Redivis |
|---|---|
| Description: | Supports working with Redivis API through R. Parse metadata, execute queries, and load data into R. |
| Authors: | Redivis Inc. [aut, cre, cph] |
| Maintainer: | Redivis Inc. <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.13.1 |
| Built: | 2026-10-13 03:45:22 UTC |
| Source: | https://github.com/redivis/redivis-r |
DEPRECATED: please use redivis$current_notebook
current_notebook()current_notebook()
class<Notebook>
## Not run: redivis::current_notebook()$create_output_table(df) ## End(Not run)## Not run: redivis::current_notebook()$create_output_table(df) ## End(Not run)
Makes open(file) behave like file$open(), returning a
read-only connection backed by HTTP range requests.
## S3 method for class 'File' open(con, mode = "r", ...)## S3 method for class 'File' open(con, mode = "r", ...)
con |
A Redivis File object |
mode |
Character string. |
... |
Ignored (present for compatibility with the generic) |
A readable connection backed by HTTP range requests
DEPRECATED: please use redivis$organization
organization(name)organization(name)
name |
The organization's username |
class<user>
## Not run: redivis::organization('demo_organization')$dataset('some_dataset')$table('a_table')$to_tibble(max_results=100) # We can also construct a query scoped to a particular dataset, removing the need to fully qualify table names redivis::organization('demo_organization')$dataset('some_dataset')$query("SELECT * FROM table_1 INNER JOIN table_2 ON id")$to_tibble() ## End(Not run)## Not run: redivis::organization('demo_organization')$dataset('some_dataset')$table('a_table')$to_tibble(max_results=100) # We can also construct a query scoped to a particular dataset, removing the need to fully qualify table names redivis::organization('demo_organization')$dataset('some_dataset')$query("SELECT * FROM table_1 INNER JOIN table_2 ON id")$to_tibble() ## End(Not run)
DEPRECATED: please use redivis$query
query(query = "", default_workflow = NULL, default_dataset = NULL)query(query = "", default_workflow = NULL, default_dataset = NULL)
query |
The query string to execute |
default_workflow |
Optional workflow reference used to resolve unqualified table references. Defaults to the REDIVIS_DEFAULT_WORKFLOW environment variable. |
default_dataset |
Optional dataset reference used to resolve unqualified table references. Defaults to the REDIVIS_DEFAULT_DATASET environment variable. |
class<Query>
## Not run: output_table <- redivis::query(query = 'SELECT 1 + 1 AS two')$to_tibble() ## End(Not run)## Not run: output_table <- redivis::query(query = 'SELECT 1 + 1 AS two')$to_tibble() ## End(Not run)
Redivis wrapper, all primary constructor accessible via redivis$<constructor>()
Full documentation and examples available at: https://apidocs.redivis.com/client-libraries/redivis-r
redivisredivis
An object of class environment of length 17.
list(authenticate, current_notebook, current_user, current_workflow, dataset, datasource, file, make_api_request, notebook, organization, parameter, query, table, transform, user, workflow)
library(redivis)
# Reference various resources
redivis$current_user()
redivis$dataset(name)
redivis$datasource(source)
redivis$notebook(name)
redivis$organization(name)
redivis$parameter(name)
redivis$table(name)
redivis$transform(name)
redivis$user(name)
redivis$workflow(name)
# Create a SQL query
redivis$query(query)
# Only available within Redivis notebooks
redivis$current_notebook()
redivis$current_workflow()
user$secret("MY_SECRET")$get_value()
organization$secret("OUR_SECRET")$get_value()
# Read data
query$to_tibble()
table$to_tibble()
# also:
# to_data_table()
# to_arrow_table()
# to_arrow_batch_iterator()
# to_sf_tibble()
# ...
table$download(path=NULL, format="csv", ...)
# DBI interface
con <- redivis$connect_dbi()
# Read files (file tables only):
table$file("path/to/file")
open(file)
file$read(...)
file$download(path=NULL, ...)
dir <- table$to_directory()
dir$get("/path/to/file/or/dir")
dir$download(path=NULL, ...)
# Upload data
table$upload()$create("/path/to/file.csv", ...)
# Upload raw files
table$add_files(directory="/path/to/dir", ...)
# List resources
organization$list_datasets(max_results)
user$list_datasets(max_results)
user$list_workflows(max_results)
dataset$list_tables(max_results)
workflow$list_tables(max_results, include_datasources=FALSE)
workflow$list_transforms(max_results)
table$list_variables(max_results)
#...etc, see documentation
# Miscellaneous methods, for advanced use cases
redivis$authenticate(scope=NULL, force_reauthentication=FALSE)
redivis$make_api_request(method="GET", path, ...)
## Not run: df <- redivis$table("demo.ghcn_daily_weather_data.stations")$to_tibble() df <- redivis$query("SELECT 1+1 as two")$to_tibble() redivis$dataset("demo.ghcn_daily_weather_data")$exists() # TRUE datasets <- redivis$organization("demo")$list_datasets(max_results=10) workflows <- redivis$current_user()$list_workflows(10) # Only callable from within a Redivis notebook notebook <- redivis$current_notebook(); workflow <- redivis$current_workflow(); ## End(Not run)## Not run: df <- redivis$table("demo.ghcn_daily_weather_data.stations")$to_tibble() df <- redivis$query("SELECT 1+1 as two")$to_tibble() redivis$dataset("demo.ghcn_daily_weather_data")$exists() # TRUE datasets <- redivis$organization("demo")$list_datasets(max_results=10) workflows <- redivis$current_user()$list_workflows(10) # Only callable from within a Redivis notebook notebook <- redivis$current_notebook(); workflow <- redivis$current_workflow(); ## End(Not run)
Create a Redivis DBI driver
RedivisDBI()RedivisDBI()
A RedivisDriver object
DEPRECATED: please use redivis$user
user(name)user(name)
name |
The user's username |
class<user>
## Not run: redivis::user('my_username')$workflow('my_workflow')$table('my_table')$to_tibble(max_results=100) # We can also construct a query scoped to a particular workflow, removing the need to fully qualify table names redivis::user('my_username')$workflow('my_workflow')$query("SELECT * FROM table_1 INNER JOIN table_2 ON id")$to_tibble() ## End(Not run)## Not run: redivis::user('my_username')$workflow('my_workflow')$table('my_table')$to_tibble(max_results=100) # We can also construct a query scoped to a particular workflow, removing the need to fully qualify table names redivis::user('my_username')$workflow('my_workflow')$query("SELECT * FROM table_1 INNER JOIN table_2 ON id")$to_tibble() ## End(Not run)