Skip to content
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

orderly_metadata_extract(..., extract = "jibberish") returns empty column #159

Open
jeffeaton opened this issue Jul 4, 2024 · 1 comment

Comments

@jeffeaton
Copy link

Specifying to extract a column that doesn't exist just returns an empty column name if I try to extract a column that doesn't exist:

> orderly_metadata_extract(extract = "jibberish")
                        id jibberish
1 20240704-225610-cc4efc1c          

Would be helpful for that to throw an error if not one of the keys.

@richfitz
Copy link
Member

richfitz commented Jul 5, 2024

It might be helpful in some contexts, but not in others, so it does not do this.

If we adopted the suggested change then the function will become hard to reason about, because if you happen to run a metadata extraction that does not have any information for a valid query, then the function fails and its impossible to predict when you run the function if that should have happened or not. If you want to error if you fail to recover information you should perhaps throw yourself

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants