Scénario de test & Cas d'usage
Simulate the creation of a directory structure on the server's file system that the CAS controller can access. This mimics the DNFS path that will be used.
| 1 | /* This shell command simulates creating the required directory structure. It must be run on the server where the path is accessible. */ |
| 2 | /* mkdir -p /mnt/dnfs_datalake/iot_data/region_a/device_001; */ |
| 3 | /* mkdir -p /mnt/dnfs_datalake/iot_data/region_a/device_002; */ |
| 4 | /* mkdir -p /mnt/dnfs_datalake/iot_data/region_b/device_001; */ |
| 1 | PROC CAS; |
| 2 | TABLE.addCaslib / |
| 3 | name="IoTDatalake" |
| 4 | description="Global DNFS Data Lake for IoT Sensor Data" |
| 5 | path="/mnt/dnfs_datalake/iot_data/" |
| 6 | dataSource={srcType="DNFS"} |
| 7 | SESSION=false |
| 8 | subDirectories=true |
| 9 | createDirectory=true; |
| 10 | RUN; QUIT; |
| 1 | |
| 2 | PROC CAS; |
| 3 | |
| 4 | TABLE.caslibInfo / caslib="IoTDatalake"; |
| 5 | RUN; |
| 6 | |
| 7 | QUIT; |
| 8 |
| 1 | |
| 2 | PROC CAS; |
| 3 | |
| 4 | TABLE.fileInfo / caslib="IoTDatalake" path="region_a/device_001"; |
| 5 | RUN; |
| 6 | |
| 7 | QUIT; |
| 8 |
The 'IoTDatalake' caslib is created with global scope and persists across sessions. The caslibInfo action shows its scope as 'Global' and its path pointing to the DNFS mount. The fileInfo action successfully lists files within the nested subdirectories, confirming that 'subDirectories=true' is working correctly. The caslib is now a permanent fixture for all CAS users (subject to permissions).