metadata-qa-api icon indicating copy to clipboard operation
metadata-qa-api copied to clipboard

Empty column in CSV if no extracted field

Open atiro opened this issue 4 years ago • 2 comments

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 avatar Jul 07 '21 17:07 atiro

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

pkiraly avatar Jul 07 '21 20:07 pkiraly

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

pkiraly avatar Jul 07 '21 20:07 pkiraly