Skip to content

tzmfreedom/yasd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

54 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.