PDI · Question #67
Which two sfdx commands can be used to add testing data to a Developer sandbox?
The correct answer is A. Forced: data:bulk:upsert C. Forced: data: tree: upsert. Developers can use sfdx force:data:bulk:upsert for high-volume data loading and sfdx force:data:tree:upsert for importing related records to add testing data to a Developer sandbox.
Question
Which two sfdx commands can be used to add testing data to a Developer sandbox?
Options
- AForced: data:bulk:upsert
- BForced: data: object :upsert
- CForced: data: tree: upsert
- DForced: data:async:upsert
How the community answered
(28 responses)- A71% (20)
- B11% (3)
- D18% (5)
Why each option
Developers can use `sfdx force:data:bulk:upsert` for high-volume data loading and `sfdx force:data:tree:upsert` for importing related records to add testing data to a Developer sandbox.
The `sfdx force:data:bulk:upsert` command allows developers to import a large volume of data into Salesforce objects using the Bulk API, which is efficient for populating a sandbox with significant test datasets.
There is no standard `sfdx force:data:object:upsert` command; the command for upserting a single record or small amounts of data is `sfdx force:data:record:upsert`.
The `sfdx force:data:tree:upsert` command is used to import data that has parent-child relationships, typically defined in a JSON file, which is crucial for creating realistic test data scenarios across multiple related objects.
There is no standard `sfdx force:data:async:upsert` command; asynchronous operations are often handled implicitly by `bulk` commands, but 'async:upsert' is not a specific SFDX command.
Concept tested: SFDX commands for data import and test data creation
Source: https://developer.salesforce.com/docs/atlas.en-us.sfdx_cli_reference.meta/sfdx_cli_reference/cli_reference_force_data.htm
Topics
Community Discussion
No community discussion yet for this question.