dbz-cli
This crate provides a CLI tool dbz for converting the Databento Binary
Encoding (DBZ) files to text formats. This tool is heavily inspired by the
zstd CLI.
Usage
dbz currently supports CSV and JSON (technically newline-delimited JSON)
as output formats.
By default dbz outputs the result to standard output for ease of use with
text-based command-line utilities.
Running
|
will print the first the header row and 4 data rows in some.dbz in CSV format to the console.
Similarly, running
|
Will extract only the high prices from ohlcv-1d.dbz.
You can also save the results directly to another file by running
dbz will create a new file some.csv with the data from some.dbz
formatted as JSON.
When the file name passed --output or -o ends in .json or .csv, you
can omit the --json and --csv flags.
This writes the contents of another.dbz to data.json in CSV format.
By default, dbz will not overwrite an existing file.
To replace the contents of an existing file and allow overwriting files, pass
the -f or --force flag.
Building
dbz is written in Rust, so you'll need to have Rust installed
first.
To build, run the following commands:
Testing
Tests are run through cargo test.
All integration tests are located in integration_tests.rs.
License
Distributed under the Apache 2.0 License.