rstudio / pins-r

Pin, Discover and Share Resources
https://pins.rstudio.com
Other
301 stars 62 forks source link

Feature request: option to deploy human-readable format in parallel with binary deployment for datasets #788

Open ntentes opened 9 months ago

ntentes commented 9 months ago

A common workflow for me is to deploy a pin containing a dataset to Connect in both a binary and human-readable format. This usually happens when R/python users want a fast, consistently typed binary (like qs or arrow) and other business users want to be able to download from Connect in csv format to pull into a spreadsheet.

Currently, I have to deploy both of these separately with unique names (and GUIDs). When distributing the pin or a when a user searches for the pin in Connect, I either have to inform them of both deployments/names or give them the correct link/name based on their tooling.

For example, my pin_write() calls usually look like this:

board %>%
  pin_write(account_information, 
            name = "account_information", 
            type = "arrow"
            )

board %>%
  pin_write(account_information,
            name = "account_information_csv", 
            type = "csv"
            )

I'm not sure of the best way to implement this in terms of interface, but in my mind's eye I see something like an option to include_human_readable:

board %>%
  pin_write(account_information, 
            name = "account_information", 
            type = "arrow",
            include_human_readable = TRUE
            )

or even an option to include multiple types:

board %>%
  pin_write(account_information, 
            name = "account_information", 
            type = c("arrow", "csv")
            )

Another benefit of "coupling" multiple deployment types of the same deployment could be having import redundancy in the case that the pin reader does not have the required package to download a special type like arrow or qs.

Thanks!

juliasilge commented 9 months ago

I like this idea a lot!

board |>
  pin_write(account_information, 
            name = "account_information", 
            type = c("arrow", "csv"))

We do already have the ability to store multiple files together in a pin in pin_upload() so this might not be too tough.