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

Salesforce Data Loader CLI - updated

I am trying to use Salesforce Data Loader CLI to move data in and out Salesforce and have following questions, please help!!!

1) Can we use Stored Proc in CLI

2) As we know Salesforce id/pwd expires every 3 months, does that mean I also have to update process-config.xml evey 3 months. Is there any workaround.

3) How can I delete a subset of data from Salesforce (I know if I have Salesforce IDs in CSV or in database, it can be deleted by creating a bean for it but...) is there any other way of doing it.

4) Since last modified date and time is changed for both 'success' and 'error' files after each job how can I notify scheduler that there was an error in last run. Any better way of doing it.





1) Stored Procedures do not exist really.  You can use the process-conf.xml and database-conf.xml files to create operations for dataloader to do.  Since there are a limited number of actions that Data Loader can perform, the variety is limited.  But you could have the process set up to run a full account export, and a different process that would update the account table.  Your Cron Scheduler could then implement the processes in your sepcified order


2) If your password is set to expire, then you will have to update the files with the current password.  If this is an issue, you can set up a Data Loader profile and set the password to never expire (it is a setting on the profile, not the user)


3) In order to delete a record from salesforce, you need to have the ID.  If you know the definition of the subset you want to delete, then you could set up a process to export that data, and then use that generated file as the source file in another delete process.


4) The recommendation here would be to have custom names of your success and error files and have them stored in directory A (you can set this with the process.outputSuccess and process.outputError parameters in the config).  Your scheduler could analyze the error file to see if there are records, and take action as necessary.  Once the action is complete, or if there is no action, move the files into directory B.  This will mean that there will only be one set of files in directory A at any time.


Hope this helps