parquetwrite: 'VariableNames' is not a recognized parameter

I'm using parquetwrite and Matlab 2024a. I'm trying to use the VariableNames optional input but I'm getting an error message saying: 'VariableNames' is not a recognized parameter.
Why am I getting this error? In the help documentation it says VariableNames was added to parquetwrite starting in R2024a. I'm running version 24.1.0.2578822 (R2024a) Update 2.

6 个评论

@David: please show us the output of these commands:
version
which parquetwrite -all
>> version
ans =
'24.1.0.2578822 (R2024a) Update 2'
>> which parquetwrite -all
C:\Program Files\MATLAB\R2024a\toolbox\matlab\io\parquet\parquetwrite.m
Please show the complete error message. This means all of the red text.
Error using parquetwrite (line 188)
'VariableNames' is not a recognized parameter. For a list of valid name-value pair arguments, see the
documentation for this function.
How are you calling parquetwrite: from a script or from the command-line ?
I'm running from the command line.
For example, here's the output if I take the parquetwrite documentation example and add a VariableNames input:
>> T = readtable('outages.csv');
>> parquetwrite('outagesDefault.parquet',T,'VariableNames',T.Properties.VariableNames)
Error using parquetwrite (line 188)
'VariableNames' is not a recognized parameter. For a list of valid name-value pair arguments, see the
documentation for this function.

请先登录,再进行评论。

回答(1 个)

Hi,
I can reproduce the problem in R2024a. The code works fine in R2024b.
Workaround for R2024a: In your example, there should not be a need to specify VariableNames since according to the documentation, they will be derived from the input table anyway. If in other settings you need different variable names, I'd suggest to change the VariableNames of the input table (or a copy of it):
T = readtable('outages.csv');
T2 = T;
T2.Properties.VariableNames = newNames;
parquetwrite('outagesDefault.parquet',T2)
Best wishes,
Harald

类别

帮助中心File Exchange 中查找有关 Tables 的更多信息

标签

提问:

2025-10-17

回答:

2025-10-21

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by