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

Empty column in CSV if no extracted field #74

Open
atiro opened this issue Jul 7, 2021 · 2 comments
Open

Empty column in CSV if no extracted field #74

atiro opened this issue Jul 7, 2021 · 2 comments

Comments

@atiro
Copy link
Contributor

atiro commented Jul 7, 2021

Possibly an artificial condition, but just noticed as I swapped around YAML files that if you have enabled FieldExtractor measurements but you have no fields marked as extractable, you still have an empty value for that calculator in the CSV output. Presumably becauseStringUtils.join(items, ',') in FieldCounter is returning a blank string that is output, e.g.:

,0.6,0.666667,0,1,1,0,1,0,1,1,0,1

Obviously I shouldn't be enabling the FieldExtractor unless I'm using it! But might be nice to
not output anything from a calculator if it has no items to measure.

(after changes from #69 )

@pkiraly
Copy link
Owner

pkiraly commented Jul 7, 2021

@atiro Yes, I agree. I'll fix it.

pkiraly added a commit that referenced this issue Jul 7, 2021
@pkiraly
Copy link
Owner

pkiraly commented Jul 7, 2021

@atiro You can try it. If there is no extractable field, field extraction is not going to work even if the user enables it.

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