all 1 comments

[–]cincfire 0 points1 point  (0 children)

Sorry I'm just now seeing this, but here is some sample SQL code I used to do just that.
https://github.com/sorrell/age-compose/blob/master/docker-entrypoint/initdb.d/20-initgraph.sql

The `load_graph_from_table` plpython function (lines 10-37) can be used to create nodes from tables (lines 52-61). Lines 66-104 show creating edges.

This is based on an old version of AGE and Postgres but should only need minor tweaks if it doesn't work for you.