Working with non-tabular data

Load a single file


# References the file bogota.tiff at
file <- redivis::file("4c10-d8rqhswh8.zz7AB9NJB2ctNpDGKbRD7w")

# Download the file
download_location <- file$download("./my-downloads")
f <- read_file(download_location)

# Read the image file
file_content_bytes = file$read()

# Stream a file
data <- file$stream(function(x) {

# We can also work with text file data, e.g.:
file <- redivis::file("4c10-bk27tqmet.rkgXgUlmnJrEFFC6oWAqqA")
file_content_string <- file$read(as_text=TRUE)

Load all files in a table


table <- redivis::organization("Demo")$dataset("example_data_files")$table("example_file_types")

# Download all files

files = table$list_files()

# Read file contents into memory (don't do this for very large files!)
for (file in files){
    file_content_bytes =
    # do something...

Last updated