pkiraly/metadata-qa-api

Empty column in CSV if no extracted field

Opened this issue · 2 comments

atiro commented

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 )

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

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