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

Support nodrop directive on split #174

Open
Arch-vile opened this issue Aug 12, 2022 · 2 comments
Open

Support nodrop directive on split #174

Arch-vile opened this issue Aug 12, 2022 · 2 comments

Comments

@Arch-vile
Copy link

How can one handle empty "" values when splitting so that those would not be discarded on the produced array of values? In the example below the second line "d","","f" has empty string on the middle that will be discarded when split.

This becomes a problem when one tries to pick fields from the split with the index as _split[1] will give b on first row but f on the second which are of different column values on input.

echo -e '"a","b","c"\n"d","","f"' | agrind '* | split'
[_split=[a, b, c]]
[_split=[d, f]]

The split could also support the nodrop directive?

Is there any solution to get around this for now?

@rcoh
Copy link
Owner

rcoh commented Aug 22, 2022

Adding no drop to split seems plausible, would happily accept a PR

@rcoh
Copy link
Owner

rcoh commented Aug 22, 2022

One workaround could be splitting outside of angle grinder then sending it to agrind as json input

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