apache / apache/age

Recommended way to create a graph from a table or SQL query

Open
#289 5 comments 0 reactions 0 assignees View on GitHub
question
Dominant language
C
Stars
4.8k
Forks
523
Avg merge
1d 2h
Merged PRs (30d)
9

Description

Hello.

What is the recommended way to create a graph from a table (or from an SQL query, in general)?

Say, we have a table `A` with fields `id` and `parent_id`, where the latter refers back to the former of some row.
How would I go about and cast this into an AGE graph easily?
Ideally, this would be without doing a client-server roundtrip of first querying table rows and then creating the corresponding graph vertices and edges.

Currently, there seems to be a way to load graphs from CSV files (https://age.apache.org/age-manual/master/intro/agload.html), but this doesn't really help in this case.
Also, there seems to be a helper function written in plpython available (https://github.com/sorrell/age-compose/blob/master/docker-entrypoint/initdb.d/20-initgraph.sql#L10-L37), but this isn't ideal either.

Best regards.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.