Home

Awesome

exiahuang/dataloader

Features

exiahuang/dataloader Features

cli usage

  1. clone
git clone https://github.com/exiahuang/dataloader.git

  1. config config.properties

for 43.0.0~47.0.0

ant encrypt -Dpassword=your_password -Dapiversion=47.0.0

for 40.0.0~42.0.0

ant encrypt_before_v42 -Dpassword=your_password -Dapiversion=42.0.0

Copy the generated encrypted password and set sfdc.password in config.properties.

  1. start to export
# usage
ant start_export -Dsobject_name=Sobject_name -Dsoql="Soql"

#example
ant start_export -Dsobject_name=User -Dsoql="select id,name from user limit 100"

export

#example
ant start_export -Dsobject_name=User -Dsoql="select id,name from user limit 100" -Dapiversion=47.0.0

exportAll

ant export_all -Dsobject_name=User -Dsoql="select id,name from user limit 100" -Dapiversion=47.0.0

insert

ant insert -Dsobject_name=you_test_object__c -Dsdl="./insert/insert.sdl" -Dcsv="./insert/insert.csv" -Dapiversion=47.0.0

TIPS: How to create sdl file ? I always use SalesforceXyTools For Chrome to create it.

update

ant update -Dsobject_name=you_test_object__c -Dsdl="./update/update.sdl" -Dcsv="./update/update.csv" -Dapiversion=47.0.0

upsert

ant upsert -Dsobject_name=you_test_object__c -Dsdl="./upsert/upsert.sdl" -Dcsv="./upsert/upsert.csv" -Dextid="Id or yourExtId" -Dapiversion=47.0.0

delete

ant delete -Dsobject_name=you_test_object__c -Dsdl="./delete/delete.sdl" -Dcsv="./delete/delete.csv" -Dapiversion=47.0.0

hard delete

TODO: hard delete not work

ant hard_delete -Dsobject_name=you_test_object__c -Dsdl="./delete/delete.sdl" -Dcsv="./delete/delete.csv" -Dapiversion=47.0.0

About Linux Environment or WSL

You can find Mac or Windows Installing Guide, But no linux. This is the environment for Ubuntu 18.04.2 LTS / WSL.

install Zulu java

Azul Zulu Linux Repo!

apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 0xB1998361219BD9C9
sudo apt-add-repository 'deb http://repos.azulsystems.com/ubuntu stable main'
sudo apt install -y zulu-11

Zulu java version:

$ java -version

openjdk version "11.0.6" 2020-01-14 LTS
OpenJDK Runtime Environment Zulu11.37+17-CA (build 11.0.6+10-LTS)
OpenJDK 64-Bit Server VM Zulu11.37+17-CA (build 11.0.6+10-LTS, mixed mode)

you can use openjdk-11-jdk

$ java -version

openjdk version "11.0.5" 2019-10-15
OpenJDK Runtime Environment (build 11.0.5+10-post-Ubuntu-0ubuntu1.118.04)
OpenJDK 64-Bit Server VM (build 11.0.5+10-post-Ubuntu-0ubuntu1.118.04, mixed mode, sharing)

check/change java version

check all java version in your os.

update-java-alternatives -l

change java version

sudo update-alternatives --config java

install ant

sudo apt -y install ant