Forum Discussion
Day 6 has the fun situation where you have to do a sliding window of data traversal. I’ve done this a FEW times in the past, but know that the typical easiest way to do it is to have an array generated with all of the potential start or end indexes available to you. Since the Sequence Snap only allows pipeline parameters, I have mine saved from last year of doing this where you pass a value to the pipe exec and it returns an array of the appropriate size based on the pipeline parameter. Here’s that pipeline
Screenshot:
SLP File:
generate_sequence_array_2022_12_06.slp (4.7 KB)
Okay now that we’ve cleared up the hardest part of this problem, my final solution for Day 6 was to use this generate_sequence_array
to generate the array the size of the input data, and then generate the 4-character sequences, once I did that it provided the ability to do processing via a filter, group by field, then further filter with a final aggregate snap to get the proper answer. I only changed a few things between the two parts, but it was a generally tricky, but not impossible problem to do.
Screenshot:
SLP File:
day06_2022_12_06.slp (35.4 KB)
@tlikarish informed me of a way to avoid the sub-pipeline for generate_sequence_array
by using the sl.range
function from the expression language, huge revelation for me, and that will hopefully simplify future pipeline examples that I might need to make!