cascalog
cascalog copied to clipboard
ClojureFilter receiving no fields in filterCall arguments in Cascalog 2.0
A JCascalog CascalogFilter that we are using isn't getting any fields passed in as part of the filterCall argument.
Here is the filter:
private static class FilterNullContentTypes extends CascalogFilter {
@Override public boolean isKeep(FlowProcess process, FilterCall filterCall) {
int i = filterCall.getArguments().getFields().getPos("!content-type");
String value = filterCall.getArguments().getTuple().getString(i);
return !StringUtils.hasText(value);
}
}
filterCall.getArguments() is returning: "fields: [NONE] tuple: []"
The SubQuery where it is being used looks like this:
Subquery filterQuery = new Subquery("?practice-id", "!create-date", "!content-type", "?patientid",
"?source", "?create_timestamp")
.predicate(outerJoinQuery, "?practice-id", "!create-date", "!content-type", "?patientid", "?source",
"?create_timestamp")
.predicate(new FilterNullContentTypes());
Hey @dkincaid, is this still an issue? Would love a pull req if you guys have come across a workaround. Thanks!