+ Start a Discussion
Steven HoughtalenSteven Houghtalen 

I am looking for a way to export a larger number of csv files using Apex

I work for a non profit and need to periodically export a large number (60) of CSV files for gov't reporting.   I have looked through a lot tools to do this and for those that I reviewed, they all have short comings - mostly you need to do them one at a time.   Exporting them one at a time is too labor intensive when you have to do so many of them so often.  So far, I haven't found any solution so am wondering if someone has some ideas on how to do this or know of already developed solutions.  Additionally the names of these csv files change every month so would like to manage the naming under program control.   Thank you.   Steve 
Best Answer chosen by Steven Houghtalen
Alain CabonAlain Cabon

1) "the gov't agencies detect some errors so we need to correct some of the data."  
It is perhaps just a problem of encoding if you have accented characters (you can change the encoding of the exported data).
Otherwise, these global exported data have to be accurate. It is the easier solution at first.

2) Did you try "Talend" or "Pentaho Kettle"?
The problem for the free community versions of these very powerfull tools (ETL = extract/transform/load) is often an obsolete connector for Salesforce (old version: i.e version 32 instead of 44 and this version is just up to date for the paying version that is expensive) but you can try the free version because that is often sufficient but it is more risky than the "data loader" that is the only official free tool of Salesforce (always up to date for every new version of Salesforce).

3) data loader:  https://developer.salesforce.com/docs/atlas.en-us.dataLoader.meta/dataLoader/loader_batchmode_intro.htm
You can duplicate 60 batch launches and one global .bat.

All Answers

Alain CabonAlain Cabon
Hi,

Did you try to export all the data of your org and filter the exported files (if needed) weekly (quick search: data export)?

With the free "data loader", you can also export data using queries and shedule the launches with .bat (windows).

 
Steven HoughtalenSteven Houghtalen
Hi Alain,  
Thank you for your response.  

In ref to "export all the data .....', when we upload the data, most often the gov't agencies detect some errors so we need to correct some of the data.  This requires us to re-run the exports several times a day.  Export only allows once a day or once a week....I forget.

In reference to "Data Loader" that is worth some investigation.  Where can I find out how to schedule the launches with .bat(Windows)?
Alain CabonAlain Cabon

1) "the gov't agencies detect some errors so we need to correct some of the data."  
It is perhaps just a problem of encoding if you have accented characters (you can change the encoding of the exported data).
Otherwise, these global exported data have to be accurate. It is the easier solution at first.

2) Did you try "Talend" or "Pentaho Kettle"?
The problem for the free community versions of these very powerfull tools (ETL = extract/transform/load) is often an obsolete connector for Salesforce (old version: i.e version 32 instead of 44 and this version is just up to date for the paying version that is expensive) but you can try the free version because that is often sufficient but it is more risky than the "data loader" that is the only official free tool of Salesforce (always up to date for every new version of Salesforce).

3) data loader:  https://developer.salesforce.com/docs/atlas.en-us.dataLoader.meta/dataLoader/loader_batchmode_intro.htm
You can duplicate 60 batch launches and one global .bat.
This was selected as the best answer
Steven HoughtalenSteven Houghtalen
Alain,

I did not look at Talend or Pentaho Kettle but will.  Thanks.

I just watched a Data Loader Batch youtube video (see link below) and this has a lot of promise.  Using .bat envrionment is kind of klunky for this day and age but workable.  Also, you have to encrypt your password with a serices of command line steps but is workable for intiail setup for my users, however, when their passwords change, it will force them through the password encryption process again.  

But, other than that, it does everthing I want.  After actually testing it, I will will find out for sure.

Thanks for the suggestions.   
Steve 

https://www.youtube.com/watch?v=MMqefoSESts
Alain CabonAlain Cabon
The community editions are difficult to find now but they still exist.

Pentaho:  http://events.pentaho.com/CE-Download_Data-Integration-ALL-OS.html

Talend:   https://www.talend.com/products/data-integration/data-integration-open-studio/?utm_medium=talendcommunity&utm_source=navmenu&utm_campaign=downloads

License and Support: Free open source Apache license

Complete tools for free with Salesforce connectors.