Hi,
I wanted to look at the log file of one of the built-in measurements
this morning.
Never mind the pretty printing, but I found that CSVQ [1] which I use
for a lot of things can read JSON :=-)-O
Given a log file "atlas.json" and executing
csvq -i JSON
allows (line separation for readability)
SELECT ROUND(AVG(`avg`),4) AS Average, \
COUNT(*) AS Records \
FROM JSON_TABLE('{}',atlas);
which results in something like
+---------+---------+
| Average | Records |
+---------+---------+
| 0.5673 | 9556 |
+---------+---------+
I also find that the jsonlite library of R allows reading of the same
file.
Probably not news to anyone, but I found it kind of cool.
greetings, el
[1] https://github.com/mithrandie/csvq
--
Dr. Eberhard W. Lisse \ / Obstetrician & Gynaecologist
[email protected] / * | Telephone: +264 81 124 6733 (cell)
PO Box 8421 \ /
Bachbrecht 10007, Namibia ;____/