Scénario de test & Cas d'usage
Simulation of a large sensor dataset exported to a CSV file in the CASUSER library.
| 1 | |
| 2 | DATA casuser.sensor_temp; |
| 3 | DO i=1 to 1000; |
| 4 | SensorID=i; |
| 5 | Reading_Value=rand('normal', 50, 5); |
| 6 | Reading_Time=datetime(); |
| 7 | OUTPUT; |
| 8 | END; |
| 9 | |
| 10 | RUN; |
| 11 | |
| 12 | PROC CAS; |
| 13 | TABLE.save TABLE={name='sensor_temp', caslib='casuser'} name='sensor_log_big.csv' replace=true; |
| 14 | TABLE.dropTable name='sensor_temp' caslib='casuser'; |
| 15 | |
| 16 | QUIT; |
| 17 |
| 1 | |
| 2 | PROC CAS; |
| 3 | TABLE.columnInfo RESULT=r / TABLE={name='sensor_log_big.csv', caslib='casuser'}; |
| 4 | PRINT r; |
| 5 | |
| 6 | QUIT; |
| 7 |
The action successfully reads the header of the 'sensor_log_big.csv' file from the storage (Caslib) and displays the column names and inferred types (e.g., Reading_Value as Double) without creating an in-memory table.