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

exporting field help text and description in bulk

TIL that you can create custom report type on entity definition + field definition to report on your fields! h/t : https://www.asagarwal.com/how-to-report-on-objects-and-fields-defined-in-salesforce/ and Anna Loughnan However I could not... Continue →