Lewis
To be clear, graph data must be ingested by PostgreSQL using the AGE
extension  - not Postgres alone.
Of course you can create data with CREATE OpenCypher query but this is not
realistic for large data sets. See example below.

   - For very large files there is a function that can read csv files, one
   for nodes, another for relationships, but this is not in main branch yet.
   If you need it we can provide it or if you can wait until mid Jan we expect
   it will be publicly available and documented.
   - Alternatively if your data is not private, you can send it to me, I
   will ingest it for you and send you back a pgdump that will contain your
   data that you can pull straight back into your postgres with AGE extension.

I'm based in the UK so 8 hours ahead of you in CA. Feel free to call me if
you wish
Joe +447788148772

example friends graph
SELECT CREATE_GRAPH('agc_graph');

SELECT * from cypher('agc_graph', $$
        CREATE
        (a :Male {Name: 'Adam', Age: 25}),
        (b :Male {Name: 'Bert', Age: 26, Eyes: 'Brown'}),
        (c :Male {Name: 'Carl', Age: 27}),
        (d :Female {Name: 'Dee', Age: 25}),
        (e :Female {Name: 'Eve', Age: 25}),
        (f :Female {Name: 'Fia', Age: 28}),
        (a)-[:follows { Duration: 5}]->(b),
        (b)-[:follows]->(a),
        (b)-[:follows]->(c),
        (b)-[:follows]->(d),
        (d)-[:follows]->(a),
        (c)-[:follows]->(d),
        (c)-[:follows]->(e),
        (c)-[:follows]->(f),
        (f)-[:follows]->(d),
        (e)-[:follows]->(b)

$$) as (foo agtype);

On Fri, 24 Dec 2021 at 11:34, Joe Fagan <joe.fa...@bitnine.net> wrote:

> Lewis
>
> How are you using AGE. For example if you are using docker, there is a
> good readme at at
> https://hub.docker.com/repository/docker/joefagan/incubator-age
>
> You can also find documentation at
> https://age.apache.org/docs/master/index.html
>
> Are you already familiar with PostgreSQL and/or OpenCypher?
>
> How much data do you wish to ingest? What format is the data currently in?
> How many nodes?
>
> A contributor Muhammad Shoaib https://github.com/muhammadshoaib has
> developed a ver fast .csv ingest utility that is just about to be made
> public. We can make that available to you.
>
> Thanks
> Joe
>
>
>
> On Fri, 24 Dec 2021 at 01:12, lewis john mcgibbney <lewi...@apache.org>
> wrote:
>
>> Hi users@,
>> Does anyone know if a getting started AGE tutorial exists?
>> What’s not clear to me is whether data is ingested directly into
>> PostgreSQL or via AGE…?
>> I’ve read the documentation regarding graph creation but I’ve not found
>> documentation related to populating the graph or data ingestion generally.
>> Can anyone shine some light on this for me?
>> Thanks
>> lewismc
>> --
>> http://home.apache.org/~lewismc/
>> http://people.apache.org/keys/committer/lewismc
>>
>

Reply via email to