Upload
class Upload
Uploads are the interface for bringing data into Redivis. They are associated with a particular table, and can be created on any table belonging to an unreleased version of a dataset. Multiple uploads can be added to a table, in which case they are "stacked" together (equivalent to a union join, with mixed schemas supported).
Constructors
table$upload(upload_name)
Construct a reference to an upload based on its name.
Examples
table <- dataset$table("table_name")
upload <- table$upload()$create(
"./data.csv", # Path to file, data.frame, raw vector, etc
type="delimited", # Inferred from file extension if not provided
remove_on_fail=True, # Remove the upload if a failure occurs
wait_for_finish=True, # Wait for the upload to finish processing
raise_on_fail=True # Raise an error on failure
)dataset <- redivis$user("user_name")$dataset("dataset_name", version="next")
table <- dataset$table("table_name")
dir_path <- "/path/to/data/directory"
for (filename in list.files(dir_path)){
upload <- table$upload()$create(content=base::file.path(dir_path, filename))
}Attributes
table
A reference to the Table instance that constructed this upload.
properties
A named list containing the API resource representation of the upload. This will only be populated after certain methods are called, particularly the get method.
Methods
upload$create(data[, ...])
Create an upload with the provided data and/or configuration.
Delete an upload.
Check whether an upload exists.
Fetch an upload and populate upload$properties
upload$insert_rows(rows, [, update_schema])
Insert rows into an upload of type "stream"
upload$list_variables([max_results])
List the variables associated with a given upload.
upload$to_*([max_results, ...])
Various methods to read data out of an imported (but not yet released) upload. Mirrors the various Table$to_* methods (e.g., upload$to_tibble()
upload$variable(name)
Construct a new variable instance, scoped to this upload.
Last updated
Was this helpful?