Scénario de test & Cas d'usage
Precise calculation of percentiles and quantiles.
Discover all actions of percentileCreation of a large dataset (2 million rows) simulating temperature readings from sensors on different production lines.
| 1 | DATA casuser.sensor_data (bufsize=1m); |
| 2 | call streaminit(456); |
| 3 | DO line_id = 1 to 10; |
| 4 | DO sensor_id = 1 to 100; |
| 5 | DO i = 1 to 200; |
| 6 | base_temp = 70 + (line_id * 2.5); |
| 7 | temperature = rand('NORMAL', base_temp, 1.5); |
| 8 | OUTPUT; |
| 9 | END; |
| 10 | END; |
| 11 | END; |
| 12 | keep line_id sensor_id temperature; |
| 13 | RUN; |
| 1 | |
| 2 | PROC CASUTIL; |
| 3 | load |
| 4 | DATA=casuser.sensor_data outcaslib='casuser' casout='sensor_data' replace; |
| 5 | QUIT; |
| 6 |
| 1 | PROC CAS; |
| 2 | percentile.boxPlot / |
| 3 | TABLE={name='sensor_data', groupBy={'line_id'}}, |
| 4 | inputs={{name='temperature'}}, |
| 5 | method='ITERATIVE', |
| 6 | pctlDef=5; |
| 7 | RUN; |
The action should complete efficiently without errors, returning approximate percentile statistics for each production line. The results will provide a quick and scalable way to monitor the operational temperature range for each line, demonstrating the effectiveness of the iterative method for big data scenarios.