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

Keep your (users) API access in check (part 1)

TL/DR: you should turn on API Access Control as soon as you can! ORIGINAL POST: There are tons of amazing applications out there that connect to Salesforce - heroku apps like the perm comparator, salesforce plugins for excel, chrome... Continue →