function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Vinny12Vinny12 

Batch class vs dataloader

Hello,

 

Can someone tell me,

what's the difference or feature between Data Loader and apex batch class??

 

Why to use batch class when we are able to do it with dataloader settings (i.e migrating the data in batches)

 

 

Thanks in advance

Best Answer chosen by Admin (Salesforce Developers) 
Jerun JoseJerun Jose
Basically Apex data loader is a desktop tool and it is meant for data migration between two systems. In other words, when you want to move data between SFDC and some other environment, you go with data loader.
Say like you want to take a weekly backup of the account object and store it on your desktop, then you can use data loader.

Batch Apex is meant for processing of bulk data within SFDC. It should be used when you have some logic that you want to apply on large data volumes within SFDC, but has nothing to do with an external environment.
Say like you want to send an email to all users who have not logged in in the past month, you can use batch apex (assuming your user volume is BIG).

All Answers

robdobbyrobdobby

From the Data Loader Guide:  Use the Data Loader when: You need to load 50,000 to 5,000,000 records. If you need to load more than 5,000,000 records, we recommend you work with a Salesforce.com partner.

 

Batch job can manipulate 50 million records.  Custom code is way more flexible, but also more time consuming to write, debug, test.  These blog posts do a good job of covering the limits:

 

http://blog.shivanathd.com/2013/01/how-to-write-batch-class-in.html

 

http://www.embracingthecloud.com/2011/01/23/UsingBatchApex.aspx

Jerun JoseJerun Jose
Basically Apex data loader is a desktop tool and it is meant for data migration between two systems. In other words, when you want to move data between SFDC and some other environment, you go with data loader.
Say like you want to take a weekly backup of the account object and store it on your desktop, then you can use data loader.

Batch Apex is meant for processing of bulk data within SFDC. It should be used when you have some logic that you want to apply on large data volumes within SFDC, but has nothing to do with an external environment.
Say like you want to send an email to all users who have not logged in in the past month, you can use batch apex (assuming your user volume is BIG).
This was selected as the best answer
Vinny12Vinny12
Thank you Jerun
Vinny12Vinny12
Thank you