https://github.com/tzmfreedom/yasd
Yet Another Salesforce Dataloader with golang
https://github.com/tzmfreedom/yasd
cli golang salesforce
Last synced: 12 months ago
JSON representation
Yet Another Salesforce Dataloader with golang
- Host: GitHub
- URL: https://github.com/tzmfreedom/yasd
- Owner: tzmfreedom
- License: mit
- Created: 2018-09-06T15:50:36.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-12-19T13:28:37.000Z (over 7 years ago)
- Last Synced: 2025-02-13T20:49:22.599Z (over 1 year ago)
- Topics: cli, golang, salesforce
- Language: Go
- Size: 68.4 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://travis-ci.org/tzmfreedom/yasd)
# 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
```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
```bash
$ curl -sL http://install.freedom-man.com/yasd.sh | bash
```
For golang user
```bash
$ go get github.com/tzmfreedom/yasd
```
## Usage
Export records
```bash
$ yasd export -q {SOQL}
```
Insert records
```bash
$ yasd insert -t {Salesforce Object Name} -f {path to source file} [--mapping {path to mapping file}] [--insert-nulls]
```
Update records
```bash
$ yasd update -t {Salesforce Object Name} -f {path to source file} [--mapping {path to mapping file}] [--insert-nulls]
```
Upsert records
```bash
$ yasd upsert -t {Salesforce Object Name} -f {path to source file} [--mapping {path to mapping file}] [--insert-nulls]
```
Delete records
```bash
$ yasd delete -t {Salesforce Object Name} -f {path to source file} [--mapping {path to mapping file}]
```
Undelete records
```bash
$ yasd undelete -t {Salesforce Object Name} -f {path to source file} [--mapping {path to mapping file}]
```
Encrypting Password
```bash
$ 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](https://github.com/tzmfreedom/yasd/blob/master/LICENSE) file.