Closed leostewart closed 10 months ago
Thank you for filing this issue. We appreciate your feedback and will review the issue as soon as possible. Remember, however, that GitHub isn't a mechanism for receiving support under any agreement or SLA. If you require immediate assistance, contact Salesforce Customer Support.
@leostewart - excellent issue write-up! I very much appreciate all the details. Unfortunately, you're correct that the problem is in the response handed us by the REST API call to get column metadata. It's a bug that they are returning "aggregate": true
for a column with an alias, rather than an actual aggregate column such as COUNT(Id)
.
I'm going to close this since it's not a CLI bug, but please open a support case so the appropriate server side team can fix it.
@shetzel , did the "force" cli use a different API? It returned aggregate rows correctly. Of course, it doesn't run on recent
OSX builds...
@tggagne - by "force" cli do you mean the force data soql query
command? If so, that's an alias for data query
so it runs the same code. These commands haven't changed much from sfdx v7 to sf v2. Same API.
Summary
Depending on if and how fields are aliased in aggregate queries, the aggregated value is not shown in either human or csv result formats. This may or may not be a bug in the CLI.
Steps To Reproduce
Name
Expected result
Output the aggregated value
Actual result
The aggregated value is suppressed
System Information
Additional information
Here are some example queries that do not output the aggregated value
And some that do
I suspect the likely culprit is the column metadata returned by the REST API given the difference between this response
and this one
where the only variable is the alias, but the column is considered aggregate.