Create a JSON file and type the word sfdx or datadeploy to view a list of code snippets.
Snippet
Description
sfdx-datadeploy-descriptor
Scaffold of a deployment descriptor with a blank jobs list
sfdx-datadeploy-job
Scaffold of a deployment job with placeholder for sObject name
sfdx-datadeploy-job-config
Scaffold of a deployment job configuration (use inside job object)
In the editor of a datadeploy.json file you will benefit from JSON validation and code completion. For example, press Ctrl+Space / Cmd+Space inside the job configuration objects to view a list of available configuration properties.
Deploying from Data Files to Salesforce
Using the command palette (Ctrl+Shift+P / Cmd+Shift+P):
Open the command palette and type sfdx data.
Select the command SFDX: Deploy Data To Org.
Select the deployment directory from the displayed list.
Select the data files to deploy from the displayed list or press Enter right away to deploy all files.
Using the explorer context menu:
Right-click on a deployment directory in the explorer view.
Select SFDX: Deploy Data From Folder To Org from the context menu. This will deploy all data files in the folder.
Retrieving from Salesforce to Data Files
Using the command palette (Ctrl+Shift+P / Cmd+Shift+P):
Open the command palette and type sfdx data.
Select the command SFDX: Retrieve Data From Org.
Select the deployment directory from the displayed list.
Select the data files to retrieve from the displayed list or press Enter right away to retrieve all files.
Using the explorer context menu:
Right-click on a deployment directory in the explorer view.
Select SFDX: Retrieve Data From Org To Folder from the context menu. This will retrieve all data files in the folder.
Known Limitations
SFDX commands are always run against your default org. If you have connected Salesforce CLI to multiple orgs make sure that the right one is set as default org.
Explorer context menu items also appear for directories which do not contain any deployment descriptor. This is due to limitations of Visual Studio Code for controlling the visibility of menu items.