Closed januz closed 1 year ago
Hey @januz, sorry for slow reply - been unwell.
Yeah that's a good point - I should add support for environment variables. I also was going to support reading multiple sharing credentials at once potentially - so might work on those together.
Yes still working on new version but unfortunately delayed due to being unwell.
Hi @zacdav-db, thanks so much for getting back to me and I'm so sorry to hear that you aren't doing well! Thanks for considering my feature request and all the best to you.
@januz I've added this functionality in latest PR (https://github.com/zacdav-db/delta-sharing-r/pull/10).
The change:
sharing_creds_from_env()
sharing_client(credentials = ...)
no longer expects only a path but either a valid DeltaShareCredentials
or a path.You can either opt to create your own DeltaShareCredentials
(it's essentially a list) or use the new helper to build this from env vars.
@zacdav-db Fantastic, thank you so much!
Hey @zacdav-db, I was wondering whether you would be willing to implement an alternative way to load the DeltaSharing credentials.
Currently, the
sharing_client()
function expects a JSON file (typicallyconfig.share
). While that works well locally, it doesn't work as well when running jobs through GithubActions where I didn't want to check in the file into version control itself but instead work with Github Sectrets / environment variables.I worked around it by writing a wrapper function that creates the JSON from the Secrets and saves it as a temporary file that is read in using
sharing_client()
(see below) but I was wondering whether you could just add another parameter to thesharing_client()
function, e.g.,credentials_list
(and rename the current parametercredentials_file
), that would allow to pass it a list with the credentials (i.e., skips thejsonlite::read_json()
step and just provides its output objectcreds
directly.Thanks for your consideration!
Here my wrapper function for reference:
P.S. Are you still planning to release a new version that will enable the CDF functionality?