I am trying to create a condition that displays most recent 20 batches in the last month. Is there a good way to do this? I am currently using the below formula, but I get the error Uncertain Scalars cannot be used as thresholds for ScalarPredicates at 'isGreaterThanOrEqualTo', because it seems my $earliest_start is always an uncertain value.
$capsule = capsule(now() - 1month, now())
$selected = $batch_condition.toGroup($capsule,CapsuleBoundary.EnclosedBy).pick(-20)
$earliest_start = $selected.startKey()
$batch_condition.removeLongerThan(40h).keep('Start',isGreaterThanOrEqualTo($earliest_start))
Is there any way I can fix this issue or get the most recent 20 batches another way?