ExamGecko
Question list
Search
Search

List of questions

Search

Question 237 - Certified B2B Commerce Administrator discussion

Report
Export

A developer needs to import some new product data contained in a JSON file one time. What are two viable ways to do this?

A.
Convert the JSON to an xlsx file and use Workbench to import it
Answers
A.
Convert the JSON to an xlsx file and use Workbench to import it
B.
Run a command like: sfdx force:data:tree:import -f NewProducts.json -u <your username>
Answers
B.
Run a command like: sfdx force:data:tree:import -f NewProducts.json -u <your username>
C.
Convert the JSON to a CSV file and use Data Loader to import it
Answers
C.
Convert the JSON to a CSV file and use Data Loader to import it
D.
Run a command like: sfdx force:data:import:bulk -f NewProducts.json -u <your username>
Answers
D.
Run a command like: sfdx force:data:import:bulk -f NewProducts.json -u <your username>
Suggested answer: B, C

Explanation:

To import some new product data contained in a JSON file one time, a developer can use two viable ways:

Convert the JSON to a CSV file and use Data Loader to import it. Data Loader is a tool that allows developers to load data into Salesforce objects in bulk. Data Loader supports CSV files as the source format for the data. The developer can use a tool likeJSON to CSV Converterto convert the JSON file to a CSV file, and then use Data Loader to map the fields and import the data into the desired object1.

Run a command like: sfdx force:data:tree:import -f NewProducts.json -u <your username>. Salesforce CLI is a command-line interface that allows developers to perform various tasks on Salesforce orgs. The force:data:tree:import command can import data from a JSON file into an org. The -f flag specifies the path to the JSON file, and the -u flag specifies the username of the org.The JSON file must follow the sObject Tree format, which defines the records and their relationships in a nested structure2.Reference:3: JSON to CSV Converter4,1: Load Data with Data Loader - Trailhead5,2: Import and Export Data with the SObject Tree - Trailhead6

asked 23/09/2024
K W
25 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first