Sample

<< Click to Display Table of Contents >>

Navigation:  Reference > Transforms >

Sample

Description

Selects a subset of rows from the input.

 

Inputs

One.

 

Options

Set Rows to the number of rows you want to output. If it is the same or greater than the number of rows in the input, then the input will be unaffected.

Set Select depending on how you want the rows sampled.

Check Disable sampling to turn off sampling. If sampling is disabled, the transform does nothing.

 

Notes

If you are transforming a large dataset, then you can use Sample to test a small subset.

If you need to do something more complex than Sample can handle (e.g. keep only rows 500 to 1000) then use Row Num followed by a Filter. For the most complex cases use Row Num, followed by Javascript, followed by a Filter. E.g. this Javascript function returns 1 for every 10th row between 1000 and 2000 and 0 otherwise:

 

return $(Row Num) >= 1000 & $(Row Num) <= 2000 & $(Row Num) % 10 == 0;