ForceCLI/force

Include "State Message" from batch on bulk query status

Closed this issue · 1 comments

When getting the status of a batch submitted with the bulk command, please show the value for "State Message" if the value has data.

Currently this is what is returned:

$ force bulk query status 123456 123456ABC

Id 123456ABC
JobId 123456
State Failed
CreatedDate 2018-07-05T16:49:34.000Z
SystemModstamp 2018-07-05T16:49:34.000Z
NumberRecordsProcessed 0

Suggested change would add State Message:

$ force bulk query status 123456 123456ABC

Id 123456ABC
JobId 123456
State Failed
State Message InvalidBatch : Failed to process query: FUNCTIONALITY_NOT_ENABLED: Selecting compound data not supported in Bulk Query
CreatedDate 2018-07-05T16:49:34.000Z
SystemModstamp 2018-07-05T16:49:34.000Z
NumberRecordsProcessed 0

Added in #636.

$ force bulk batch 750540000092HZwAAM 75154000008rIN6AAM

Id                      75154000008rIN6AAM
JobId                   750540000092HZwAAM
State                   Failed
StateMessage            InvalidBatch : Failed to process query: INVALID_FIELD: SELECT Id, BadField FROM Account            ^ ERROR at Row:1:Column:12 No such column 'BadField' on entity 'Account'. If you are attempting to use a custom field, be sure to append the '__c' after the custom field name. Please reference your WSDL or the describe call for the appropriate names.
CreatedDate             2022-11-09T14:28:20.000Z
SystemModstamp          2022-11-09T14:28:21.000Z
NumberRecordsProcessed  0