parthenon is a tool that convert Athena terms into JSON values.
The binaries can be found in the Releases section.
The latest image can be downloaded via the following command:
docker pull haskellenthusiast/parthenonOther images can be found at Dockerhub.
After cloning this repository, the following command can be used to build the binary:
stack builddocker build . -t parthenon:latest# Create a schema
cat << EOF > vectors
array<struct<x: double, y: double, z: double>>
EOF
cat << EOF > athena-vectors
[{x=1.0, y=1.0, z=1.0}]
EOF
echo '[{x=1.0, y=1.0, z=1.0}]' | parthenon @vectors -
# [{"x":1,"y":1,"z":1}]
echo '[{x=1.0, y=1.0, z=1.0}]' | parthenon 'array<struct<x: double, y: double, z: double>>' -
# [{"x":1,"y":1,"z":1}]
parthenon 'array<struct<x: double, y: double, z: double>>' '[{x=1.0, y=1.0, z=1.0}]'
# [{"x":1,"y":1,"z":1}]
parthenon 'array<struct<x: double, y: double, z: double>>' @athena-vectors
# [{"x":1,"y":1,"z":1}]Using the Docker image is similar to the commands above:
docker run --rm -i parthenon:latest 'array<struct<x: double, y: double, z: double>>' '[{x=1.0, y=1.0, z=1.0}]'
echo '[{x=1.0, y=1.0, z=1.0}]' | docker run --rm -i parthenon:latest 'array<struct<x: double, y: double, z: double>>'To make it easier to invoke the image, the following alias can be used:
alias parthenon='docker run --rm -i parthenon:latest'