Scénario de test & Cas d'usage
Simulate a larger volume of machine log data with random error codes occurring over time.
| 1 | |
| 2 | DATA mycas.machine_logs; |
| 3 | call streaminit(999); |
| 4 | DO machine_id = 1 to 100; |
| 5 | DO time_tick = 1 to 50; |
| 6 | IF rand('UNIFORM') > 0.8 THEN DO; |
| 7 | error_code = byte(65 + floor(rand('UNIFORM')*4)); |
| 8 | OUTPUT; |
| 9 | END; |
| 10 | END; |
| 11 | END; |
| 12 | |
| 13 | RUN; |
| 14 |
| 1 | |
| 2 | PROC CAS; |
| 3 | sequence.cspade / TABLE={name='machine_logs'} sequenceId='machine_id' eventId='time_tick' itemId='error_code' supportCnt=5 maxLen=3 maxGap=2 maxSize=2 casout={name='error_patterns', replace=true}; |
| 4 | |
| 5 | RUN; |
| 6 |
The action identifies specific error code patterns (e.g., 'A -> B') that occur frequently across machines but only when the errors happen within 2 time ticks of each other, isolating 'burst' events from unrelated sporadic errors.