When you export the database from OrientDB, you get a huge JSON file packed with data. Getting OrientDB to play nice with that file is tricky business, so we’ll work around that.
Instead, we’re going to:
Note: I wasn’t able to get local file paths to work (like file:///Users/example/out.graphml), so you’ll have to upload your GraphML file to the interwebs somewhere (I just uploaded mine to the GitHub repo)
HOST:PORT/studio/index.html#/database/StudentResource/db/import-export)gunzip StudentResource.gz to extract the archivemv StudentResource orient-db-export.json to rename it to a JSON fileNext, let’s convert the JSON file to a GraphML file (called out.graphml):
time npx odb2graphml orient-db-export.json -v Concept,Construct,Data,Discussion,Entity,Error,Example,FullExample,Lecture,Module,Python,Resource,Theme,V -e CSError,CSExample,CoreError,CoreExample,DesignExample,E,HasCode,MTError,MTExample,Related,appear,contain,exRelated,explain,implements,produce,require,teaches
You should see an output like:
Success! Converted 1210 edges and 1104 vertices. Pruned 1 edge. Written to out.graphmlodb2graphml orient-db-export.json -v -e 0.80s user 0.07s system 125% cpu 0.694 total
Success!
⏰ Note that the time command above is optional - it just tells you how long the command took