Salesforce DX Absolute Beginner ( Part 7 Of 7 )

In this seventh part of the salesforce DX series, I am going to show how to use salesforce DX data commands to migrate the sample data from the scratch org to sandbox for testing or you can create data into the scratch org from the CLI.
Use force:data:soql:query command to Executes a SOQL query as shoe below.This Command will help if you wanted to retrieve data into CLI from scratch org without login. Use -t for tooling API 



 

Export Command 
 Exports data from an org into the sObject tree format  as shown below

 

Import Command 
 Imports data into an org using the SObject Tree Save API. This data can include master-detail relationships. The following command imports the data into Salesforce objects by using SObject Tree.

Create/Update/Delete Commands 
 You can use CRUD commands to manipulate the data the CLI as shown below.
Below example showing the how to inserts account record from the CLI.
Below example showing the how to delete account record from the CLI.
Below example showing the how to update account record from the CLI.

Bulk Commands 

 You can use Bulk commands to delete or upsert the data into Bulk API Style.

The Following commands Create a job and one or more batches for inserting new rows and updating existing rows by accessing the Bulk API.

Above Command Inserts or updates records from a CSV file with one or more batch based on the CSV, file size and Returns a job ID and a batch ID. Use these IDs to check job status with data:bulk: status as shown below.

 

Below are some of the useful reference about salesforce DX

  1.  Salesforce DX Trailhead
  2. First Impressions with Salesforce DX by Peter Chittum
  3. Getting Started With Salesforce DX