Scénario de test & Cas d'usage
Simulating a social graph. 'Influencer_X' is the hub. 'Fan_Y' users follow the influencer but don't follow each other.
| 1 | |
| 2 | DATA mycas.social_graph; |
| 3 | LENGTH follower $20 followed $20; |
| 4 | DO i=1 to 1000; |
| 5 | follower=cats('Fan_', i); |
| 6 | followed='Influencer_Top'; |
| 7 | OUTPUT; |
| 8 | IF mod(i, 10)=0 THEN DO; |
| 9 | followed=cats('Fan_', i-1); |
| 10 | OUTPUT; |
| 11 | END; |
| 12 | END; |
| 13 | |
| 14 | RUN; |
| 15 |
| 1 | |
| 2 | PROC CAS; |
| 3 | network.core / direction='DIRECTED' distributed=TRUE links={name='social_graph', from='follower', to='followed'} outNodes={name='influence_metrics', replace=true}; |
| 4 | |
| 5 | RUN; |
| 6 | |
| 7 | QUIT; |
| 8 |
| 1 | |
| 2 | PROC CAS; |
| 3 | TABLE.fetch / TABLE='influence_metrics' sortby={{name='core_out', order='DESCENDING'}} to=10; |
| 4 | |
| 5 | RUN; |
| 6 | |
| 7 | QUIT; |
| 8 |
The 'Influencer_Top' node should have a distinct core number reflecting its central position in the directed graph. The execution must succeed without memory errors due to the 'distributed=TRUE' parameter, and the results must differentiate between 'following' and 'being followed'.