Working with non-tabular data

Load a single file

library("redivis")

# References the file bogota.tiff at https://redivis.com/datasets/yz1s-d09009dbb/files/4c10-d8rqhswh8.zz7AB9NJB2ctNpDGKbRD7w
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) {
  print(length(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

Was this helpful?