3 ms·
Think of jq more like bash instead of a generic functional language. Blocks work on data and you pipe data along blocks. You can name blocks. That 99% of what y
by minxomat 7y ago
Think of jq more like bash instead of a generic functional language. Blocks work on data and you pipe data along blocks. You can name blocks. That 99% of what you need to get to do jq.
Here's a small example of a smaller ETL script a wrote a while ago for stats collection over scm repos: https://gist.github.com/turbo/36e87947a56cfaacec9d0356b3e521ba https://gist.github.com/turbo/36e87947a56cfaacec9d0356b3e521...
As you can see it loads data from vars, fed by other jq scripts. Don't try to put everything in one script. Each script should basically just reduce and normalize.