An Export pulls records out of Salesforce into a CSV file on your local disk. Under the hood it’s just a SOQL query that streams rows to disk through the SOAP or Bulk API.
Step-by-step
- Launch Data Loader and click Export (or Export All if you also need the recycle bin).
- Log in — production (login.salesforce.com) or sandbox (test.salesforce.com).
- Choose the Salesforce object you want to export — Accounts, Contacts, your custom object, anything queryable.
- Pick a destination CSV file. Data Loader will write the results here.
- Build the SOQL query.
- Tick the fields you want in the left panel (Data Loader generates the
SELECTclause for you). - Add a
WHEREclause for filters (Industry = 'Banking',CreatedDate = LAST_N_DAYS:30). - Add
ORDER BYandLIMITif you want predictable output. - Or paste a hand-written SOQL string into the box.
- Tick the fields you want in the left panel (Data Loader generates the
- Click Finish. Data Loader executes the query and writes the rows to the CSV in batches.
- Open the CSV — every column is one field, every row one record.
Export vs Export All
This trips people up in interviews.
- Export — returns active (non-deleted) records only. The standard backup or analysis option.
- Export All — returns active records plus records currently in the recycle bin (the soft-deleted ones, before they age out at 15 days or capacity). Useful for full backups, audit trails, or recovering before a hard delete.
Use cases
- Backup before a risky deploy. Export every record on the objects you’re about to touch.
- Bulk update. Export, edit in Excel, re-import as an
Update. - Reporting workaround. SOQL via Data Loader handles result sets reports can’t (millions of rows, joins on custom objects, etc.).
- Migration to another org. Export from source, transform, insert into target.
SOQL tips
- Always include
Idin the SELECT — you’ll need it for any follow-up update or delete. - Audit fields like
CreatedDate,CreatedById,LastModifiedDate,LastModifiedById, andSystemModstampare exportable; on insert into a new org you’ll need Set Audit Fields upon Record Creation enabled to preserve them. - For >2 GB exports turn on Use Bulk API under Settings → Settings.
- Date literals (
THIS_MONTH,LAST_N_DAYS:7) are your friend for incremental exports.
What you can’t export this way
- Attachment bodies (the binary content) — you need a separate process, or a tool like Weekly Export for that.
- Encrypted fields show as masked values unless you have View Encrypted Data permission.
- Field history beyond what the History object stores.
Verified against: Data Loader Guide — Exporting Data, Metadata API Developer Guide. Last reviewed 2026-05-17 for Spring ‘26 release.