Yet Another Salesforce Dataloader with golang
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
completions/zsh
test
.gitignore
.travis.yml
Gopkg.lock
Gopkg.toml
LICENSE
Makefile
README.md
command_utility.go
commands.go
delete.go
encrypt.go
encrypt_credential.go
encrypt_test.go
insert.go
insert_test.go
install.ps1
install.sh
main.go
query.go
reader.go
reader_test.go
response_handler.go
undelete.go
update.go
upsert.go
writer.go
writer_test.go

README.md

Build Status

YASD

Yet Another Salesforce Dataloader

Install

For Windows user with cmd.exe

@"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile ^
  -InputFormat None -ExecutionPolicy Bypass ^
  -Command "iex ((New-Object System.Net.WebClient).DownloadString('http://install.freedom-man.com/yasd.ps1'))" ^
  && SET "PATH=%PATH%;%APPDATA%\yasd\bin"

For Windows user with PowerShell

Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('http://install.freedom-man.com/yasd.ps1'))

For Linux, MacOS user

$ curl -sL http://install.freedom-man.com/yasd.sh | bash

For golang user

$ go get github.com/tzmfreedom/yasd

Usage

Export records

$ yasd export -q {SOQL}

Insert records

$ yasd insert -t {Salesforce Object Name} -f {path to source file} [--mapping {path to mapping file}] [--insert-nulls]

Update records

$ yasd update -t {Salesforce Object Name} -f {path to source file} [--mapping {path to mapping file}] [--insert-nulls]

Upsert records

$ yasd upsert -t {Salesforce Object Name} -f {path to source file} [--mapping {path to mapping file}] [--insert-nulls]

Delete records

$ yasd delete -t {Salesforce Object Name} -f {path to source file} [--mapping {path to mapping file}]

Undelete records

$ yasd undelete -t {Salesforce Object Name} -f {path to source file} [--mapping {path to mapping file}]

Encrypting Password

$ yasd generate-key > /path/to/key
$ yasd encrypt --key /path/to/key
# input your password interactively

Common Option

  • --username, -u

  • --password, -p

  • --endpoint, -e

  • --api-version

    Specify Salesforce API Version (e.g. 43.0)

  • --delimiter

    Specify CSV delimiter

  • --encoding

    Specify CSV encoding, read/write

  • --mapping

    Specify CSV header mapping file path

  • --debug, -d

    If you set debug, cli output transmitting API SOAP XML to stdout.

DML SubCommand Option (Insert, Update, Upsert, Delete, Undelete)

  • --file, -f

  • --type, -t

  • --success-file

  • --error-file

  • --query, -q

  • --output, -o

  • --format

  • --batch-size

Contribute

Just send pull request if needed or fill an issue!

License

The MIT License See LICENSE file.