soql to csv in cli

using the salesforce cli to export a soql query to a csv file is just magic.

sfdx force:data:soql:query -q “select id,parentId,parent.Name,createdDate from feeditem where createdById = ‘0051W0000065wTP’” -r csv > yourfilename.csv

that is it

sfdx
force:data:soql:query
-q “insert query here”
-r csv

boom!

 
10
Kudos
 
10
Kudos

Now read this

101 little things to make salesforce a lot better

A sporadically maintained list of coal seams smoldering deep in the caverns of salesforce.com that cause needless liver damage in many an awesome admin. In honor of summer19, this post now has the subtitle of: 101 things that might be... Continue →