mkalus / segrada

Segrada - Semantic Graph Database
http://www.segrada.org/
Other
68 stars 14 forks source link

How to get data out of segrada? A very noob issue that is my issue if someone could see if they could help, please! #81

Closed suchapalaver closed 3 years ago

suchapalaver commented 3 years ago

I used segrada on the recommendation of a friend back in 2018/2019. I entered some data from a project and had a lot of fun playing with it. Now I actually have some knowledge of things like Linux and some programming languages, but I can't figure out how I might export the data I've entered in some sort of table form. Is this possible? For example, could I somehow export a list of all my nodes? I see for example if use the export graph method I can export a .gexf file where I can see the nodes when I open the file in a text editor. It looks like this:

<gexf xmlns="http://www.gexf.net/1.2draft" version="1.2"><nodes><node id="105-92" label="driving around Vladivostok with Chinese"></node><node id="112-36" label="Driving around looking for a lighthouse"></node><node id="107-92" label="&quot;meiyou guihua&quot;"></node><node id="108-92" label="GUIHUA"></node><node id="106-51" label="KEY WORDS"></node><node id="109-92" label="&quot;zhege di guihuade feichang hao.&quot;"></node><node id="110-92" label="Zhang Zong"></node><node id="108-19" label="The Farm"></node><node id="111-91" label="People&apos;s Liberation Army"></node><node id="112-89" label="Inner dialogue / incessant commentary"></node><node id="105-93" label="temptation, doubt, anger, jealousy, aversion to physical experience"></node><node id="108-17" label="Yang Jun"></node><node id="106-17" label="Qinhuangdao"></node><node id="111-15" label="Pimenov"></node><node id="111-16" label="Li Xiaolin"></node><node id="110-16" label="Russian Island Investment Project"></node><node id="107-74" label="Transcending China / Chineseness"></node>

So it seems there must be a way to somehow export all the nodes I have. So far, I have zero joy from using orientdb to look at my data. TL;DR: I tried segrada a while back and would now like to resume the project by somehow exporting my data in a readable form back out from segrada. Thanks for any help!

mkalus commented 3 years ago

The Gephi Export will render XML which can be processed by particular graph software, so it renders just a subset of your data.

Another way is to create a dynamic query, available in the new 0.6.x version. Simply create a query with large time bounds like this:

Bildschirmfoto von 2021-11-10 20-29-29

Save the query and export the resulting data as JSON. This will return all your nodes as JSON data.

mkalus commented 3 years ago

You can also use OrientDB to llok at your data, as you mentioned. I am unsure how far you succeeded. But a rough guide would be:

suchapalaver commented 3 years ago

Both of your solutions--using the newer Segrada with dynamic queries, and using orientdb-- worked! The dynamic queries is great! It was the select * from `Node` -- I imagine this is SQL or something similar?-- that I was missing to get started displaying my data. Thank you so much!

mkalus commented 3 years ago

You are welcome! Yes, OrientDB uses some variant of SQL (among others), so it is actually quite easy to use.

mkalus commented 3 years ago

Another hint: There is an undocumented XML export for GEFX via the endpoint http://localhost:8080/export/all

GEFX will not export all the data, but one can definitely use it to extract the relation data. There will be a minor update for GEFX in 0.6.1.