- Extracts data from an oracle query and outputs to csv.
- ~3.7x faster than a plugin based JDBC implementation. (with same parameters.)
You may need to setup instant client paths if you don't have it already.
- Download oracle instant client from here
- Extract it to a path and set the
LD_LIBRARY_PATH.
export LD_LIBRARY_PATH=/path/to/instantclient_[version]-
Install zig.
-
You may need to install
libaiorequired by oracle client.
sudo apt install libaio1-
todo: implement this in Makefile and remove Justfile.
-
Download ODPI-C and place the extracted resources to
project-root/lib/odpi -
Build the binary.
zig build -Doptimize=ReleaseFast- See the binary
oxatzig-out/bin/.
zig-out/bin/ox run \
# change below to actual connection string.
--connection-string "localhost:1521/ORCLCDB" \
--username oracle_username \
# optional (auth mode if you need SYSDBA)
--auth-mode SYSDBA \
--password oracle_password \
# You can use multi line strings see examples folder.
--sql "SELECT * FROM my_schema.my_table_name" \
# output-file can be an absolute path.
--output-file "output.csv" \
--fetch-size 10000- Documentation
- Add benchmark results