Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Published by Scroll Versions from space DEV and version next

...

D s
snippetBasic

Column example:

ROLLINGKTHLARGESTUNIQUE
d-codelang-syntax
RawWrangletrue
Typeref
showNotetrue
WrangleTextderive type:single value:
rollingkthlargestunique(myCol, 2)

rollingkthlargestunique(myCol, 2)

Output: 

...

Returns the rolling second largest unique value in the myCol column from the first row of the dataset to the current one.

Rows before example:

ROLLINGKTHLARGESTUNIQUE
d-codelang-syntax
RawWrangletrue
Typeref
showNotetrue
WrangleTextwindow value:
rollingkthlargestunique(myNumber, 2, 3)

rollingkthlargestunique(myNumber, 2, 3)

Output:

...

 Returns the rolling second largest unique value of the current row and the two previous row values in the myNumber column.

Rows before and after example:

value:ROLLINGKTHLARGESTUNIQUE
d-codelang-syntax
RawWrangletrue
Typeref
showNotetrue
WrangleTextwindow value:
rollingkthlargestunique(myNumber, 4, 3, 2)

rollingkthlargestunique(myNumber, 4, 3, 2)

Output:

...

 Returns the rolling fourth largest unique value of the two previous row values, the current row value, and the two rows after the current one in the myNumber column.

...

     

D s
snippetSyntax

window value:value:ROLLINGKTHLARGESTUNIQUE
d-code
lang-syntax
RawWrangletrue
Typesyntax
showNotetrue
WrangleTextwindow value:rollingkthlargestunique(col_ref, rowsBefore_integer, rowsAfter_integer) order: order_col [group: group_col]

rollingkthlargestunique(col_ref, rowsBefore_integer, rowsAfter_integer) order: order_col [group: group_col]

...