Table

class Table

Tables are the fundamental data-containing entity in Redivis. Various methods on this class allow you to read data from Redivis tables into R.

Examples

loadNamespace("redivis")

# Specify the table's container, either a dataset or project
dataset <- redivis::organization("Demo")$dataset("iris_species")

table <- dataset$table("Iris")
table$to_tibble()
# 	Id	SepalLengthCm	SepalWidthCm	PetalLengthCm	PetalWidthCm	Species
# 0	33	5.2	        4.1	        1.5	        0.1	        Iris-setosa
# ...

# Other methods to read data:
# table$to_arrow_batch_reader()
# table$to_arrow_dataset()
# table$to_arrow_dataset()
# table$to_data_frame()
# table$to_data_table()
# table$to_sf_tibble()

Constructors

redivis::table(reference)

Return a Table within the current default scope (either a dataset or project). In a Redivis notebook, the default scope will always be the notebook's project.

Dataset$table(reference)

Return a Table within a specific dataset.

Project$table(reference)

Return a Table within a specific project.

Attributes

properties

A named list containing the API resource representation of the table. This will only be populated after one of the table methods that read data are called.

Methods

Reading data and metadata

Table$download([path, format, ...])

Export a table in a particular format and download it to disk.

Table$download_files([path, overwrite, ...])

Download all files represented in a file index table to a local directory.

Check whether the table exists

Fetch table metadata. Once called, the properties field on the table will be fully populated.

Table$list_files([max_results, ...])

Return a list of File instances in a file index table.

Table$list_variables([max_results])

Return a list of Variable instances associated with this table.

Returns a reader that mimics the Arrow RecordBatchStreamReader, which can then be consumed to process batches of rows in a streaming fashion.

Table$to_arrow_dataset([max_results, ...])

Return an Arrow Dataset for the table. Data is backed by disk, allowing for larger-than-memory analysis.

Table$to_arrow_table([max_results, ...])

Return an Arrow Table with the table's data. This is the highest-performance option for loading data in-memory.

Table$to_data_frame([max_results, ...])

Return a data.frame with the table's data.

Table$to_data_table([max_results, ...])

Return a data.table with the table's data.

Table$to_tibble([max_results, variables, ...])

Return a tibble with the table's data.

Table$to_sf_tibble([max_results, ...])

Return a simple features tibble with a table's data. Used for tables that contain a geography variable.

Reference a Variable within the table.

Uploading and modifying data

Table$create([description, ...])

Create a table within a dataset if it doesn't already exist. Table must belong to an unreleased version of the dataset.

Delete a table belonging to an unreleased version of a dataset.

Update properties on the table (name, description).

Last updated