We were trying to export & import data from a sandbox using the sfdx tree export command.
Even after going through the different links on google I could not understand how will we export a sObject which has lookup in it? Below mentioned is one of those links:
I know we can write sub SOQL queries and create a plan to retrieve all the references an object has, but when I tried creating a plan with a lookup field I started getting errors. Below is the command I tried:
sfdx force:data:tree:export “SELECT Id,CreatedById FROM Product2” -d ./data -p
What's the right way to import and export data using the above commands? I have close to 2000 records under the Product2.