function varNames = getTableVariableNames(A)
% getTableVariableNames retrieves the list of variables using a table
% template to avoid dependencies on the original distribution.

%   Copyright 2018-2022 The MathWorks, Inc.

if iscodistributed(A)
    tmpl = getTableTemplate(A);
else
    % For replicated tables we can extract directly
    tmpl = A;
end
varNames = tmpl.Properties.VariableNames;
end
