5.5.15. Sampling

<< Click to Display Table of Contents >>

Navigation:  5. Detailed description of the Actions > 5.5. Standard >

5.5.15. Sampling

 

Icon: ANATEL~3_img543

 
Function: sampling
 

Property window:

 

ANATEL~3_img542

 

Short description:

 

Create a Sample.

 

Long Description:

 

With the default parameters, the ANATEL~3_img543 Sampling Action outputs about 50% (0.5) of the first 10.000 rows of the input table. The 5.000 rows (out of the 10.000 rows) are selected randomly and change at each run.

 

This action is useful during development of a new data-transformation graph.

 

Sometime, the running-time when you click an output pin of an Action can be quite long (especially when it involves running a clip0122 Sort Action that can potentially run for several hours). To get quicker results, you can:

1.Create a Hard Drive Cache after the a clip0122 Sort Action (it will prevent running the “sort” all the time: That’s good): To do so, click the output pin of the clip0122 Sort Action and wait a little.

 

2.Work on a sample for the time required to develop the graph. For example, insert a ANATEL~3_img543 Sampling Action here:

 

ANATEL~3_img549

 

With the default settings, the sampling action returns about 5000 rows randomly selected amongst the first 10000 row of the input table (These 5000 rows are changing at each run because of the random component). Now, when you click the output pin of the aggregate action, Anatella instantaneously displays the results (because sorting a 5000 row table is almost instantaneous).

 

Once the design of your new graph is complete, remove the ANATEL~3_img543 Sampling Action completely: Leaving it “in-place“ costs a large amount of CPU time because it’s written in Javascript and it’s thus not as fast as a standard C++ Action.