wrgl commit

Commit a CSV file under a branch

wrgl commit {BRANCH | --all} [CSV_FILE_PATH] COMMIT_MESSAGE [-p PRIMARY_KEY] [flags]

Flags

--all

commit all branches that have branch.file configured.

--delimiter

CSV delimiter, defaults to comma

-h, --help

help for commit

--mem-limit

limit memory consumption (in bytes). If not set then memory limit is automatically calculated.

-n, --num-workers

number of CPU threads to utilize

-p, --primary-key

field names to be used as primary key for table

--set-file

set branch.file to CSV_FILE_PATH. If branch.file is set then you don't need to specify CSV_FILE_PATH in subsequent commits to BRANCH.

--set-primary-key

set branch.primaryKey to PRIMARY_KEY. If branch.primaryKey is set then you don't need to specify PRIMARY_KEY in subsequent commits to BRANCH.

--txid

commit using specified transaction id

Inherited flags

--badger-log

set Badger log level, valid options are "error", "warning", "debug", and "info" (defaults to "error")

--cpuprofile

write cpu profile to file

--debug

print debug logs to stdout

--debug-file

print debug logs to the given file instead

--heapprofile

write heap profile to file

--no-progress

don't display progress bar

--wrgl-dir

parent directory of repo, default to current working directory.

Examples

# commit using primary key id
wrgl commit main data.csv "initial commit" -p id

# commit using composite primary key
wrgl commit main data.csv "new data" -p id,date

# commit from stdin
cat data.csv | wrgl commit main - "my commit" -p id

# commit while setting branch.file and branch.primaryKey
wrgl commit main data.csv "my commit" -p id --set-file --set-primary-key

# commit without having to specify CSV_FILE_PATH and PRIMARY_KEY (read from branch.file and branch.primaryKey)
wrgl commit main "easy commit"

# commit all branches that have branch.file configured
wrgl commit --all "mass commit"

# commit all branches using a transaction id (run 'wrgl transaction -h' to learn more about transaction)
wrgl commit --all --txid a1dbfcc4-f6da-454c-a783-f1b70d347baf "mass commit with transaction"