Giter Site home page Giter Site logo

Comments (2)

JoshInnis avatar JoshInnis commented on August 16, 2024

https://age.apache.org/docs/Apache_AGE_Guide.pdf

In the above link, there is a section called "Advanced Queries" where there is a simple example about how to join Postgres tables.

from age.

jhgoodwin avatar jhgoodwin commented on August 16, 2024

Thanks for the guide @JoshInnis . That got me pretty close to what I was looking for. Looks like many type conversions are not yet supported - a pity.

I was able to figure this out, which does work:

WITH graph_query as (
    SELECT *
    FROM cypher( 'test_graph', $$MATCH (n) RETURN n.part_num$$
        ) as (part_num text)
    )
SELECT (g.part_num::json)#>> '{}' as part_num
FROM graph_query g
WHERE g.part_num = '"123"'
;

This will deconstruct the string value of 123 from the row. Feels like there probably is a simpler way. Maybe you know it.
From here, joining against a relational table should be trivial. Looks like part of what I was missing before is the as clause with the parenthesis syntax is how you define the row datatype of the cypher function.

from age.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.