ExamGecko
Question list
Search
Search

List of questions

Search

Question 239 - Certified B2B Commerce Administrator discussion

Report
Export

Northern Trail Outfitters (NTQ) has acquired a company and is looking to manage product data across the 43s org seamlessly. The company has a governance policy to not install any tool or use third-party API applications to export or import the data into Salesforce. However, users have access to Salesforce CLI.

Which set of tasks must a developer perform whento export data from Salesforce or import data into Salesforce?

A.
sfdx force:data:bulk:export -Product2 -all and sfdx force:data:bulk:Import -f Product? json -all
Answers
A.
sfdx force:data:bulk:export -Product2 -all and sfdx force:data:bulk:Import -f Product? json -all
B.
sfdx force:data:tree:export -Product?2 -all and sfdx force:data:tree:lmport -f Product2.json -all
Answers
B.
sfdx force:data:tree:export -Product?2 -all and sfdx force:data:tree:lmport -f Product2.json -all
C.
sfdx force:tree:data:export -q 'SELECT Id, Name FROM Product2' -u <your username> @ and sfdx force:tree:data:import -f Product2.json -all sfdx force:data:tree:export -q 'SELECT Id, Name FROM Product2' -u '<your username>' and sfdx force:data:tree:import -f Product2.json -u ''<your username>'
Answers
C.
sfdx force:tree:data:export -q 'SELECT Id, Name FROM Product2' -u <your username> @ and sfdx force:tree:data:import -f Product2.json -all sfdx force:data:tree:export -q 'SELECT Id, Name FROM Product2' -u '<your username>' and sfdx force:data:tree:import -f Product2.json -u ''<your username>'
Suggested answer: C

Explanation:

To export data from Salesforce or import data into Salesforce, a developer can use the following set of tasks:

sfdx force:data:tree:export -q ''SELECT Id, Name FROM Product2'' -u ''<your username>''. This task will export data from the Product2 object in JSON format using a SOQL query. The -q flag specifies the query to run, and the -u flag specifies the username of the org.The task will generate a JSON file named Product2.json that contains the exported data1.

sfdx force:data:tree:import -f Product2.json -u ''<your username>''. This task will import data into the Product2 object from the JSON file. The -f flag specifies the path to the JSON file, and the -u flag specifies the username of the org.The task will insert or update records in the Product2 object based on the data in the JSON file2.Reference:1: Export Data from an Org - Trailhead3,2: Import Data into an Org - Trailhead4

asked 23/09/2024
Jonathan Tang
42 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first