-
Notifications
You must be signed in to change notification settings - Fork 0
🐛 Remove attempt to support partial matching of file names #36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| #' @param ext The standard file extension for the file type, e.g. "json" | ||
| #' @keywords internal | ||
| check_blob_exists <- function(container, file, file_ext, info, path = "") { | ||
| check_blob_exists <- function(container, file, ext, info, path) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the need for separating file and ext? does this all work if you have a file with no extension? example in this repo: ./LICENSE
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a good question. Currently this function is only designed to work within the four main read functions (for parquet, json, csv and rds), which should all have standard file extensions. So the case of no extension shouldn't arise. The value of this approach is that the user can just supply file = "default" instead of file = "default.parquet" to read_azure_parquet() if they like, which is going to be useful in reskit I think. But perhaps I am over-complicating things and risking problems down the line due to overly tangly code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm thinking to push this through as it is, but your point is noted and maybe I will some day revert to just using the full filename as the argument (this can be easily handled in the read_azure_* functions).
❗Try to surface error message from Azure in list_container_names()
Closes #35 and #34
Allowing the
fileargument toread_azure_parquet()etc to be a partial match was just going to cause trouble. This removes this option and ensures that using a full file path (as returned in the "name" column ofAzureStor::list_blobs()for example) should always work, as long the file extension is as expected.