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
kallam salesforce1kallam salesforce1 

let say we have CSV file in Batch class, what will you use here Database.Batchable or Iterable? and Why?

Sai PraveenSai Praveen (Salesforce Developers) 
Hi Kallam,

We have to uset Iterable in case of the CSV file reading in the apex class. As we have several columns and rows and because of this Iterable class it creates a striing for each row. 

Please find the below example for the same.

https://developer.financialforce.com/customizations/importing-large-csv-files-via-batch-apex/

If this solution helps, Please mark it as best answer.

Thanks,