You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Would like a command to get results (successes and failures) of a force:data:bulk:upsert run #1888
force:data:bulk:upsert is a really convenient way to use the Salesforce bulk api
BUT there isn't a command to fetch the results once your job has finished, you have to go into the Salesforce UI and download them (batch by batch) or use some other method like the REST API to retrieve them
When doing a serious data import into Salesforce (several objects, hundreds of thousands of records etc) the Results of a Bulk API job are very important because:
a) for your successful rows, you want to know the Salesforce Id that got allocated (because you might well need that for a child object you're going to import next, etc. You cant always use externalids in all situations to relate objects)
b) for your failed rows (and in real life there are always failed rows) you want to know what the errors are - locking, invalid picklists, valdiation rules etc
Thank you for filing this feature request. We appreciate your feedback and will review the feature at our next grooming or sprint planning session. We prioritize feature requests with more upvotes and comments.
Hi @codeulike, sorry that this issue has been quiet. Does the force data bulk status command meet your requirements? what else would you like to see it report. Note that while we've deprecated the force namespace, the data commands are the exception to that, non "force" data commands use Bulk API 2.0 instead of 1.0 in "force"
Activity
github-actions commentedon Jan 19, 2023
Thank you for filing this feature request. We appreciate your feedback and will review the feature at our next grooming or sprint planning session. We prioritize feature requests with more upvotes and comments.
git2gus commentedon Jan 19, 2023
This issue has been linked to a new work item: W-12408034
WillieRuemmele commentedon Aug 1, 2023
Hi @codeulike, sorry that this issue has been quiet. Does the
force data bulk statuscommand meet your requirements? what else would you like to see it report. Note that while we've deprecated theforcenamespace, the data commands are the exception to that, non "force" data commands use Bulk API 2.0 instead of 1.0 in "force"codeulike commentedon Aug 1, 2023
Thanks I'll have a look at
force data bulk statusand report backcodeulike commentedon Aug 1, 2023
You asked what else would you like to see it report?
Using version 2.1.7-355d833
sf force data bulk status --job-id 750nnnnnnnnnnnnnnn --batch-id 751nnnnnnnnnnnnnnngives me:for the 162 records that failed, I want to see the error message for each row.
for the records that succeeded, I want to see the id that got generated
In the UI (for Bulk API 1) these are downloadable CSVs that give me this information:
For Bulk API 1 the rest call to fetch the results CSV is documented here: https://developer.salesforce.com/docs/atlas.en-us.api_asynch.meta/api_asynch/asynch_api_batches_get_results.htm
For Bulk API 2 I think its this one: https://developer.salesforce.com/docs/atlas.en-us.api_asynch.meta/api_asynch/get_job_failed_results.htm#get_job_failed_results
Being able to get row-by-row results of what succeeded and what failed (and why) is very very useful in real world loading scenarios
Many thanks