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

Invoke Data loader from Apex in


       I want to know  about invoking Data Loader from Apex.

Is there any API in Apex Language to invoke Data Loader in itself  rather than  at  client machine.

Any hints will be helpful...

Thanks in advance.

I dont think that is possible with Apex and the API.
DataLoader is a stand-alone Java program that interacts with a Database or local files, and then communicates with back to Salesforce via API. It is not a component of itself.

Can I ask why you would like to do this? Perhaps you could trigger the DataLoader in some other way. For example, I have a cron job that invokes my DataLoader every hour. This extracts data from a database and loads it into Salesforce. Would that type of scenario meet your needs?
Hi John,

         Thanks for the reply.
Yes this can be one solution for my need, however I was thinking to have Upload functionality in my Salesforce application itself.

Also I want to know about inheriting the import functionality Salesforce in my salesforce Application so that not each time
I would need to follow steps to import files.

So that I can able to provide easy importing of data from my application rather than going to setup->Data Management->,,,like.


You can invoke the Data Loader in batch mode from the Command Line, so there is no human interaction required. You might even have an external application 'polling' Salesforce each minute or so, waiting for a flag to be set somewhere. On seeing that flag it could activate DataLoader.

It's worth mentioning that DataLoader uses the same APIs that are available to all software, so you are always welcome to create your own application that interfaces with Salesforce. It's just that they've done a lot of the hard work already!

       I want to know the various relational databases supported by Data Loader other than Oracle.

Does it support MS Access, SQL Server ?

If yes does the database-conf file structure is same for all databases?

Any pointers will be helpful.

Data Loader uses JDBC to connect to databases. So, if you have a JDBC driver, it can connect! And, yes, there are drivers available for all popular databases (although Access might be pushing it).