Announcement: Small tool for handling ndjson files (saved objects exports)

I wrote a small tool that “unpacks” ndjson files to make them more readable and editable (and that is accompanied with a “repack” tool). I use this to

  • check in backups of my dashboards, visualizations, and searches into VCS (git/svn), with readable diffs that allow to track changes, and to occasionally
  • hand-edit the files, e.g., when some keys in my documents were renamed.

It specifically handles the nested JSONs, by exporting them into separate (by default pretty-printed) files. So basically, you give it a single export.ndjson (or let it talk to your OSD instance directly), and you get a bunch of much more readable, formatted JSON files in the current directory.

It is pip-installable via pip install ndjson-manip and comes with the commands ndjson-unpack and ndjson-repack.

Sorry, this is probably not a great announcement; I just thought that my little script could be useful to others as well and thought this forum might be good to notify. Please be nice, I do not have much time for OSS development but still want to contribute.

Now I am curious if I am the only one interested in such a thing, or if this scratches other peoples’ itches as well.

1 Like

This sounds great!
Gonna try it out in our automation when we move to OpenSearch 3.

1 Like

Very cool! dashboards-search-relevance ships with .ndjson files that are installed as part of start up, and managing them when we change the dashboard is always a pain!

1 Like