Working with non-tabular data

Load a single file

# See https://redivis.com/datasets/yz1s-d09009dbb/files for example data

t <- redivis$table("demo.example_data_files:yz1s:v1_3.example_file_types:4c10")

text_file <- t$file("pandas_core.py")
con <- text_file$open()
readLines(con)

binary_file <- t$file("bogota.tiff")
con <- binary_file$open("rb")
readBin(con)

file_contents <- text_file$read(as_text=TRUE) # Read all contents directly to memory

binary_file$download() # download to current working directory

# You can also use R's native open()
con <- open(redivis$table("table_ref")$file("filename"), "rb")

Load all files in a table

Last updated

Was this helpful?