table columnInfo

Schema Inspection of High-Volume Sensor Data Without Loading

Scénario de test & Cas d'usage

Business Context

An industrial plant generates massive CSV logs from IoT sensors stored in a data lake. The Data Engineer needs to inspect the schema of a new daily log file ('sensor_log_big.csv') to map the columns correctly before attempting to load it into memory, as loading the full file is resource-intensive and time-consuming.
About the Set : table

Loading, saving, and managing in-memory tables.

Discover all actions of table
Data Preparation

Simulation of a large sensor dataset exported to a CSV file in the CASUSER library.

Copied!
1 
2DATA casuser.sensor_temp;
3DO i=1 to 1000;
4SensorID=i;
5Reading_Value=rand('normal', 50, 5);
6Reading_Time=datetime();
7OUTPUT;
8END;
9 
10RUN;
11 
12PROC CAS;
13TABLE.save TABLE={name='sensor_temp', caslib='casuser'} name='sensor_log_big.csv' replace=true;
14TABLE.dropTable name='sensor_temp' caslib='casuser';
15 
16QUIT;
17 

Étapes de réalisation

1
Inspect the file directly on disk (CASLIB source) without loading it into RAM.
Copied!
1 
2PROC CAS;
3TABLE.columnInfo RESULT=r / TABLE={name='sensor_log_big.csv', caslib='casuser'};
4PRINT r;
5 
6QUIT;
7 

Expected Result


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.