#!/bin/bash # Check that json_to_csv.py correctly converts sample_data.json # Returns 0 on success, non-zero on failure python3 -c 'import sys,json; d=json.load(sys.stdin); exit(0 if d["records_processed"]==2 else 1)' < <(python3 /root/.hermes/wizard-outputs/spark/json_to_csv.py /root/.hermes/wizard-outputs/spark/sample_data.json /tmp/test_out.csv 2>&1)