Discussion Forum

Migrate data from postgres db to grakn db using python

I want to know if i am moving my data from postgres to type db using client python. How should i go ahead with it?
Also want to know how could i move data in json directly to type db from client end, instead of creating a data csv, json, xml files separately and then migrating it.

Migrating data is different for each dataset. The reason for this is that to make good use of TypeDB you need to first build an elegant knowledge model in TypeQL and build a migration program (ETL) that will transform your data from tabular data in postgres into first normal form graph data in TypeDB. You can use the Java, Python or NodeJS drivers to build this. Alternatively, you can dump data to static files and leverage a great project that has already solved most fo the challenges.

Again, you can migrate json directly to TypeDB by writing a migrator that takes in JSON and generates the pertinent TypeQL insert queries to execute on TypeDB.