Salesforce Apex Data Loader is only officially supported on the Windows platform but the source code is available as an open source project for anyone to build it for another platform such as Linux or Mac. The data loader is written in Java using the Spring Framework so it can be easily rebuilt for any platform that supports the JDK and corresponding Eclipse SWT for GUI. If you don't care much for the GUI to do the mapping and simply want to use it from the command-line, then the good news is that the same JAR file from the Windows installation can be used to run the process in another platform without having to rebuild the code.
What's missing however are the Linux version of the utility scripts (in the bin\ directory in windows installation) to do the password encryption and process execution. I recently had to execute the data loader jobs from Linux and ended up writing the missing scripts so it is easy to mimic the Windows command line process (as explained in Chapter 5 in the guide).
The code is on github and includes the default configuration options and a sample extract process. The directories mirror the Windows version and the following steps walk you through the process:
Enjoy and feel free to use the code!
-Senthil
What's missing however are the Linux version of the utility scripts (in the bin\ directory in windows installation) to do the password encryption and process execution. I recently had to execute the data loader jobs from Linux and ended up writing the missing scripts so it is easy to mimic the Windows command line process (as explained in Chapter 5 in the guide).
The code is on github and includes the default configuration options and a sample extract process. The directories mirror the Windows version and the following steps walk you through the process:
- From your Linux (or Mac) terminal, execute the following command to clone the project from github
$ git clone https://github.com/sthiyaga/dataloader.git
- Copy the dataloader-30.0.0-uber.jar from the Windows installation to dataloader/ directory (from above)
- Generate the private key to encrypt the password
$ bin/encrypt.sh -g <some-random-seed-text>
- Copy the output from Step 3 above to the file conf/private.key (replacing the text in there)
- Encrypt the salesforce password (+security token, if required) using the generated private key
$ bin/encrypt.sh -e "password+securitytoken" conf/private.key
- Copy the output from Step 4 above to the conf/config.properties file for the sfdc.password token value
- Update the conf/config.properties file with sfdc.username and sfdc.endpoint token values
- Optionally, adjust any other default parameters in the conf/config.properties file
- Run the sample account extract process
$ bin/process.sh csvAccountExtractProcess
Enjoy and feel free to use the code!
-Senthil