T = parquetread(filename)
T = parquetread(filename, Name, Value)
| Parameter | Description |
|---|---|
| filename | a string: Parquet file to read. |
| Name, Value | optional arguments specified as name-value pairs. |
| Parameter | Description |
|---|---|
| T | a table or timetable. |
T = parquetread(filename) reads a local Parquet file and returns its contents as a table.
T = parquetread(filename, Name, Value) customizes the read operation. Supported names are OutputType, SelectedVariableNames, RowTimes, StartTime, SampleRate, TimeStep, RowGroups, RowFilter, and VariableNamingRule.
OutputType can be 'table' or 'timetable'. When a timetable is requested, row times can be supplied with RowTimes, generated from StartTime and SampleRate, generated from StartTime and TimeStep, or taken from the first file variable.
SelectedVariableNames limits the returned variables. RowGroups limits the row groups read from the file. RowFilter accepts a nelson.io.RowFilter object and applies it to the returned table.
filename = [tempdir(), 'doc_parquetread.parquet'];
T = table(int32([1; 2; 3]), [10.5; 20.5; 30.5], ["low"; "mid"; "high"], ...
'VariableNames', {'Id', 'Value', 'Label'});
parquetwrite(filename, T);
R = parquetread(filename)
filename = [tempdir(), 'doc_parquetread_selected.parquet'];
T = table(int32([1; 2; 3; 4]), [10; 20; 30; 40], logical([true; false; true; false]), ...
'VariableNames', {'Id', 'Value', 'Flag'});
parquetwrite(filename, T);
R = parquetread(filename, 'SelectedVariableNames', {'Id', 'Flag'})
filename = [tempdir(), 'doc_parquetread_filter.parquet'];
T = table(int32([1; 2; 3; 4]), [10; 20; 30; 40], 'VariableNames', {'Id', 'Value'});
parquetwrite(filename, T);
rf = rowfilter({'Id', 'Value'});
R = parquetread(filename, 'RowFilter', rf.Value >= 30)
filename = [tempdir(), 'doc_parquetread_timetable.parquet'];
T = table([100; 200; 300], 'VariableNames', {'Signal'});
parquetwrite(filename, T);
TT = parquetread(filename, 'OutputType', 'timetable', ...
'StartTime', datetime(2026, 1, 1), 'TimeStep', seconds(5))
| Version | Description |
|---|---|
| 2.0.0 | initial version |