Why do you use Apache AGE?

Hello Apache AGE users!
I am curious to see use cases of Apache AGE to better understand and support our community.
Whether it's for data analysis, application development, college task or anything else, we'd love to hear how you're using AGE.
Please share any of the following:

Your project or application type;
Any integrations with other technologies;
Challenges solved with Apache AGE;
Unique or interesting use cases; or
Anything else you think it's worth sharing.

Why? These insights help us improve AGE and guide our development priorities.
How to Share: Simply comment below with details about your use of Apache AGE, also provide a link to your project if you have any.
Thank you for contributing to our community!

My number one reason is because AGE is built on top of Postgres.
Most of our relational data is already in Postgres so AGE enables the combination of SQL and Cypher, very powerful.
The biggest challenge I'm having with AGE is trying to extend AGE with search capability.
I'm using ParadeDB's pg_bm25 extension but it can't index AGE's agtype data.
My ultimate goal is to integrate AGE with LLM but it needs searching capability(both bm25 and vector search).

Essentially that ^, hopefully Age development can get some boosters it to catch up to neo4j.

I am working with a firm that is using AGE for our PostgreSQL layer for authentication purposes in our app and taking care of multiple instances in a graph-based mode to develop the solution with a metered connection. Cypher and PostgreSQL combination would be of good use to me there.

In bioinformatics and genomics research, Apache Age is used to analyze genetic data and intricate biological networks. Apache Age makes it easier to identify genes linked to disease, analyze biological pathways, and uncover the functions of genes by visualizing genetic and protein interactions as graphs. Precision agriculture, tailored medicine, and drug development are all benefited by this use case. With its ability to handle and analyze graph data, Apache Age is a potent tool that spurs innovation in a variety of industries and provides insightful information. Apache Age shows itself to be a flexible solution for utilizing the potential of graph data, regardless of the application—social network analysis, recommendation systems, fraud detection, knowledge graph management, network analysis, or biology. These are the use cases that i know of and am confident Apache Age can do

I use Apache AGE because of the following Reason:

Social Networks : Social networking platforms are inherently graph-based, with users, connections, groups, and interactions forming a complex web of relationships. Apache AGE can be used to efficiently manage and query these relationships, enabling features like friend recommendations, content personalization, and network analysis.

Recommendation Systems : E-commerce websites, streaming services, and content platforms often rely on recommendation systems to suggest products, movies, or articles to users. Apache AGE can help in modeling the relationships between users and items, as well as between the items themselves, to generate personalized recommendations based on user behavior and preferences.

Fraud Detection : In the financial and e-commerce sectors, detecting and preventing fraud is crucial. Apache AGE can be used to analyze transaction networks, identify unusual patterns, and flag potential fraudulent activities by examining the relationships and behaviors across a network of transactions and accounts.

Network and IT Operations : Companies managing large IT infrastructures can use Apache AGE to model their networks, servers, and devices as a graph. This can help in optimizing network topology, troubleshooting issues by analyzing dependencies and impacts, and enhancing security through network analysis.

Knowledge Graphs : Organizations that need to manage complex sets of data and relationships, such as in research, legal, or medical fields, can benefit from using Apache AGE to create knowledge graphs. These graphs help in organizing information in a way that reflects real-world entities and their interconnections, making it easier to derive insights and relationships.

Supply Chain Management : In supply chain management, understanding the relationships between suppliers, manufacturers, distributors, and retailers is crucial. Apache AGE can model these relationships as a graph, providing insights into efficiency, dependency, and risk analysis, which can help in optimizing the supply chain.

Bioinformatics : In the field of bioinformatics, graph databases can be used to model complex biological systems, including genetic, protein, and metabolic interactions. Apache AGE can facilitate the analysis of these interactions, contributing to research in genetics, drug discovery, and personalized medicine.

@diangamichael @kpushpankar2
do you know which companies are using Apache AGE like this? Or are you personally using Apache AGE for those use cases? We’d love to hear about any real-world examples you have. Thanks! 😃

Imagine a social networking site where users can connect with each other, follow each other, and share content. In such a scenario, the relationships between users can be modeled as a graph, where users are nodes and connections (e.g., friendships, follows) are edges.
With Apache Age, you could store this graph in a PostgreSQL database, using its graph capabilities to efficiently query and analyze the relationships between users. You could use graph queries to find mutual friends, recommend new connections based on common interests, or analyze the network structure to identify influential users.
Additionally, Apache Age's integration with Apache Hadoop could be used for large-scale analysis of the social network data, such as identifying trends, clustering users based on behavior, or detecting anomalies. This combination of PostgreSQL with Apache Hadoop through Apache Age provides a powerful platform for building and analyzing complex social networks.

Imagine a social networking site where users can connect with each other, follow each other, and share content. In such a scenario, the relationships between users can be modeled as a graph, where users are nodes and connections (e.g., friendships, follows) are edges.
With Apache Age, you could store this graph in a PostgreSQL database, using its graph capabilities to efficiently query and analyze the relationships between users. You could use graph queries to find mutual friends, recommend new connections based on common interests, or analyze the network structure to identify influential users.
Additionally, Apache Age's integration with Apache Hadoop could be used for large-scale analysis of the social network data, such as identifying trends, clustering users based on behavior, or detecting anomalies. This combination of PostgreSQL with Apache Hadoop through Apache Age provides a powerful platform for building and analyzing complex social networks.
@markgomer  companies which uses Apache Age :- Boeing.com, Jacobs.com, Zapata Technology, michigan.gov etc.

@markgomer The company uses apache age
1.Zepta Technology utilizes Apache AGE within their platform to enhance their data analysis capabilities by leveraging graph database functionality integrated with PostgreSQL. By incorporating Apache AGE, Zepta Technology can handle complex connected graph data, perform graph query modeling, and access graph-specific operations within the PostgreSQL environment. This integration allows Zepta Technology to delve into scenarios where graph data structures are crucial, such as relationship analysis, social networks, recommendation systems, and knowledge graphs. Apache AGE enables Zepta Technology to seamlessly combine relational and graph data models, empowering users to perform graph data analytics efficiently with minimal effort, making it an ideal choice for organizations seeking cohesive and easy-to-implement multi-model database.

3H System US based company uses apache age for making different project because its a consulting services.

EXMC canada based flower delivery website that uses apache age for maintaining database of flowers of various variety.

4.Boeing, a renowned company in the aviation and aerospace industry, might use Apache AGE in their platform to enhance their data analysis capabilities, particularly in handling complex data relationships and graph structures

In bioinformatics and genomics research, Apache Age is used to analyze genetic data and intricate biological networks. Apache Age makes it easier to identify genes linked to disease, analyze biological pathways, and uncover the functions of genes by visualizing genetic and protein interactions as graphs. Precision agriculture, tailored medicine, and drug development are all benefited by this use case. With its ability to handle and analyze graph data, Apache Age is a potent tool that spurs innovation in a variety of industries and provides insightful information. Apache Age shows itself to be a flexible solution for utilizing the potential of graph data, regardless of the application—social network analysis, recommendation systems, fraud detection, knowledge graph management, network analysis, or biology. These are the use cases that i know of and am confident Apache Age can do
Could you please refer to anything specific, without revealing what your company doesn't allow you to?
It would really help my case.

Heey AGE users!
I have been uing AGE for 9 months now and here is what i've seen so far;
I like Age because of its graph database functionality that offers the capability to store query, and analyze graph data directly within  an existing PostgreSQL database systems.
AGE allows us to to use the power of graph databases without needing to set up or maintain a separate graph database system by integrating graph functionality seamlessly into the PostgreSQL environment.
AGE's perfomance can not be forgotten as it utilizes the power of PostgreSQL to the fullest, uses the scalable nature of PostgreSQL hence making more efficient to handle more complex graph queries with ease and more efficient.

Apache AGE is a handy tool that lets us work with graph data directly in PostgreSQL. Graph data represents connections between things, like social networks or networks of computer systems.
Instead of setting up a separate database just for graph data, Apache AGE lets us add graph features right into our existing PostgreSQL setup. This means we can manage all our data - both relational and graph data - in one place, making it simpler to handle.
Plus, because it's built on PostgreSQL, we can take advantage of all the tools and extensions available for PostgreSQL, like security features and performance optimization tools.
In short, Apache AGE helps us manage and analyze our graph data more efficiently without needing to complicate our technology setup.

@M-Bostone @Emmanuelkiplangatbett, are you using Apache AGE in any project that you can share with us here? We would love to know more about it!

Yes, I do.
Apache Age itself is an open source project that is undergoing and they do
accept all ideas on improving it and how to make it better
On Wed, Apr 3, 2024 at 9:41 PM Marco Aurélio Silva de Souza Júnior <
@.***> wrote:

@M-Bostone https://github.com/M-Bostone @Emmanuelkiplangatbett
https://github.com/Emmanuelkiplangatbett, are you using Apache AGE in
any project that you can share with us here? We would love to know more
about it!
—
Reply to this email directly, view it on GitHub
https://github.com/apache/age/issues/1705#issuecomment-2035333099, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/BFO2YCG2742XQAEYGBZNFZ3Y3REM7AVCNFSM6AAAAABE4GDGHSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMZVGMZTGMBZHE
.
You are receiving this because you were mentioned.Message ID:
@.***>

I'm recently working on a project with LlamaIndex, there're several kinds of storage can integrate with different kinds of databases, like mongodb for doc store, index store, postgres with pgvector extension for vector store, and neo4j, falkordb, neptune, nebula for graph store.
Currently I'm using neo4j community version which has some restrictions like no multiple databases support in one instance, the data migration is difficult. Nebula looks good, I do considered to move to it.
I'm a pg fan, after some google search, I found this apache age, it looks incredibly awesome, so I want to contribute the graph store integration to LlamaIndex. That's the beginning.
Thanks for your work for this project.

do you need an extra hand
On Sat, Apr 6, 2024 at 1:29 PM Noah Zhu @.***> wrote:

I'm recently working on a project with LlamaIndex, there're several kinds
of storage can integrate with different kinds of databases, like mongodb
for doc store, index store, postgres with pgvector extension for vector
store, and neo4j, falkordb, neptune, nebula for graph store.
Currently I'm using neo4j community version which has some restrictions
like no multiple databases support in one instance, the data migration is
difficult. Nebula looks good, I do considered to move to it.
I'm a pg fan, after some google search, I found this apache age, it looks
incredibly awesome, so I want to contribute the graph store integration to
LlamaIndex. That's the beginning.
Thanks for your work for this project.
—
Reply to this email directly, view it on GitHub
https://github.com/apache/age/issues/1705#issuecomment-2041042359, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/BFO2YCBDQ6VHO7AYUSHAO3TY37FBNAVCNFSM6AAAAABE4GDGHSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBRGA2DEMZVHE
.
You are receiving this because you were mentioned.Message ID:
@.***>

Hi @M-Bostone
For sure, I'm encountering some problem with age that the behavior is little different with the Neo4j in some specific case, I've already created a issue for this https://github.com/apache/age/issues/1722
I'd appreciate some help. Also I want to contribute to this project, but I need to learn more in advance.

have you tried escaping the single quotes by doubling the single quotes
like;
MERGE (n2:Entity {id: 'It''s better for technology companies to be run by
product people'})
which will tell your parser to treat the single quote in your string as
part of the string
On Sat, Apr 6, 2024 at 3:10 PM Noah Zhu @.***> wrote:

Hi @M-Bostone https://github.com/M-Bostone
For sure, I'm encountering some problem with age that the behavior is
little different with the Neo4j in some specific case, I've already created
a issue for this #1722 https://github.com/apache/age/issues/1722
I'd appreciate some help. Also I want to contribute to this project, but I
need to learn more in advance.
—
Reply to this email directly, view it on GitHub
https://github.com/apache/age/issues/1705#issuecomment-2041065431, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/BFO2YCEMHQXK6WMEXQ25LTTY37Q2HAVCNFSM6AAAAABE4GDGHSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBRGA3DKNBTGE
.
You are receiving this because you were mentioned.Message ID:
@.***>

--
men

plus if your database supports parameterized queries use them
On Sat, Apr 6, 2024 at 3:34 PM Moturi Bostone @.***>
wrote:

have you tried escaping the single quotes by doubling the single quotes
like;
MERGE (n2:Entity {id: 'It''s better for technology companies to be run
by product people'})
which will tell your parser to treat the single quote in your string as
part of the string
On Sat, Apr 6, 2024 at 3:10 PM Noah Zhu @.***> wrote:

Hi @M-Bostone https://github.com/M-Bostone
For sure, I'm encountering some problem with age that the behavior is
little different with the Neo4j in some specific case, I've already created
a issue for this #1722 https://github.com/apache/age/issues/1722
I'd appreciate some help. Also I want to contribute to this project, but
I need to learn more in advance.
—
Reply to this email directly, view it on GitHub
https://github.com/apache/age/issues/1705#issuecomment-2041065431, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/BFO2YCEMHQXK6WMEXQ25LTTY37Q2HAVCNFSM6AAAAABE4GDGHSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBRGA3DKNBTGE
.
You are receiving this because you were mentioned.Message ID:
@.***>

have you tried escaping the single quotes by doubling the single quotes like; MERGE (n2:Entity {id: 'It''s better for technology companies to be run by product people'}) which will tell your parser to treat the single quote in your string as part of the string
…
On Sat, Apr 6, 2024 at 3:10 PM Noah Zhu @.> wrote: Hi @M-Bostone https://github.com/M-Bostone For sure, I'm encountering some problem with age that the behavior is little different with the Neo4j in some specific case, I've already created a issue for this #1722 <#1722> I'd appreciate some help. Also I want to contribute to this project, but I need to learn more in advance. — Reply to this email directly, view it on GitHub <#1705 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/BFO2YCEMHQXK6WMEXQ25LTTY37Q2HAVCNFSM6AAAAABE4GDGHSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBRGA3DKNBTGE . You are receiving this because you were mentioned.Message ID: @.>
-- men

I'm using the docker image which is provided on the github README.md for some testing.
I do can put the completed query and add like backslash, use double quotes to wrap the string if the string contains single quotes or use single quotes to wrap the string if the string contains double quotes. But most of my time, I need to parameterize the queries that looks buggy, especially with the python driver.
And for now the problem from my side is all the strings are from some documents, that means I need to process the string in advance to put it as the parameters into the query, but that doesn't work for now. There's no this kinds of problems when I use the Neo4j.
Also I can't create a vertex with a label contain single quotes which works in Neo4j.

okay let me check your documents and see where the problem is
do you mind if i see your work
On Sat, Apr 6, 2024 at 3:56 PM Noah Zhu @.***> wrote:

have you tried escaping the single quotes by doubling the single quotes
like; MERGE (n2:Entity {id: 'It''s better for technology companies to be
run by product people'}) which will tell your parser to treat the single
quote in your string as part of the string
… <#m_6476712402078747728_>
On Sat, Apr 6, 2024 at 3:10 PM Noah Zhu @.> wrote: Hi @M-Bostone
https://github.com/M-Bostone https://github.com/M-Bostone
https://github.com/M-Bostone For sure, I'm encountering some problem with
age that the behavior is little different with the Neo4j in some specific
case, I've already created a issue for this #1722
https://github.com/apache/age/issues/1722 <#1722
https://github.com/apache/age/issues/1722> I'd appreciate some help. Also
I want to contribute to this project, but I need to learn more in advance.
— Reply to this email directly, view it on GitHub <#1705 (comment)
https://github.com/apache/age/issues/1705#issuecomment-2041065431>, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/BFO2YCEMHQXK6WMEXQ25LTTY37Q2HAVCNFSM6AAAAABE4GDGHSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBRGA3DKNBTGE
https://github.com/notifications/unsubscribe-auth/BFO2YCEMHQXK6WMEXQ25LTTY37Q2HAVCNFSM6AAAAABE4GDGHSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBRGA3DKNBTGE
. You are receiving this because you were mentioned.Message ID: @.>
-- men
I'm using the docker image which is provided on the github README.md for
some testing.
I do can put the completed query and add like backslash, use double quotes
to wrap the string if the string contains single quotes or use single
quotes to wrap the string if the string contains double quotes. But most of
my time, I need to parameterize the queries that looks buggy, especially
with the python driver.
And for now the problem from my side is all the strings are from some
documents, that means I need to process the string in advance to put it as
the parameters into the query, but that doesn't work for now. There's no
this kinds of problems when I use the Neo4j.
Also I can't create a vertex with a label contain single quotes which
works in Neo4j.
—
Reply to this email directly, view it on GitHub
https://github.com/apache/age/issues/1705#issuecomment-2041074897, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/BFO2YCCQ7PVYHFUFGPDN44LY37WGLAVCNFSM6AAAAABE4GDGHSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBRGA3TIOBZG4
.
You are receiving this because you were mentioned.Message ID:
@.***>

okay let me check your documents and see where the problem is do you mind if i see your work
…
On Sat, Apr 6, 2024 at 3:56 PM Noah Zhu @.> wrote: have you tried escaping the single quotes by doubling the single quotes like; MERGE (n2:Entity {id: 'It''s better for technology companies to be run by product people'}) which will tell your parser to treat the single quote in your string as part of the string … <#m_6476712402078747728_> On Sat, Apr 6, 2024 at 3:10 PM Noah Zhu @.> wrote: Hi @M-Bostone https://github.com/M-Bostone https://github.com/M-Bostone https://github.com/M-Bostone For sure, I'm encountering some problem with age that the behavior is little different with the Neo4j in some specific case, I've already created a issue for this #1722 <#1722> <#1722 <#1722>> I'd appreciate some help. Also I want to contribute to this project, but I need to learn more in advance. — Reply to this email directly, view it on GitHub <#1705 (comment) <#1705 (comment)>>, or unsubscribe https://github.com/notifications/unsubscribe-auth/BFO2YCEMHQXK6WMEXQ25LTTY37Q2HAVCNFSM6AAAAABE4GDGHSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBRGA3DKNBTGE https://github.com/notifications/unsubscribe-auth/BFO2YCEMHQXK6WMEXQ25LTTY37Q2HAVCNFSM6AAAAABE4GDGHSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBRGA3DKNBTGE . You are receiving this because you were mentioned.Message ID: @.> -- men I'm using the docker image which is provided on the github README.md for some testing. I do can put the completed query and add like backslash, use double quotes to wrap the string if the string contains single quotes or use single quotes to wrap the string if the string contains double quotes. But most of my time, I need to parameterize the queries that looks buggy, especially with the python driver. And for now the problem from my side is all the strings are from some documents, that means I need to process the string in advance to put it as the parameters into the query, but that doesn't work for now. There's no this kinds of problems when I use the Neo4j. Also I can't create a vertex with a label contain single quotes which works in Neo4j. — Reply to this email directly, view it on GitHub <#1705 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/BFO2YCCQ7PVYHFUFGPDN44LY37WGLAVCNFSM6AAAAABE4GDGHSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBRGA3TIOBZG4 . You are receiving this because you were mentioned.Message ID: @.**>

I'm working with the llamaindex, use LLM(OpenAI Model) to extract some contents to triplets like [subj, rel, obj], the contents are from any pdfs or txts, so that means I can't fully control what the LLM extract for me, maybe the subj contains some special chars, or rel and obj as well.
this is my python code
    def upsert_triplet(self, subj: str, rel: str, obj: str) -> None:
        """Add triplet."""
        rel = rel.replace(" ", "_").upper()
        prepared_statement = f"""
            MERGE (n1:`{self.node_label}` {{id: %s}})
            MERGE (n2:`{self.node_label}` {{id: %s}})
            MERGE (n1)-[:`{rel}`]->(n2)
        """

        self._age.execCypher(prepared_statement, params=(subj, obj))
        self._age.commit()

the extracted data could be:
["I", "Learned", "It's better for technology companies to be run by product people"]

or maybe the subj or rel also includes single quotes or double quotes
["I", "include any '", "It's better for technology companies to be run by product people"]

There's no problem with this kind of data in Neo4j.

sorry it took me this long to reply but i've got one of the slowest
machines there is but try this:
def upsert_triplet(self, subj: str, rel: str, obj: str) -> None:
"""Add triplet."""
rel = rel.replace(" ", "_").upper()
prepared_statement = f"""
MERGE (n1:{self.node_label} {{id: $subj}})
MERGE (n2:{self.node_label} {{id: $obj}})
MERGE (n1)-[:{rel}]->(n2)
"""
self._age.execCypher(prepared_statement, params={"subj": subj, "obj":

obj})
self._age.commit()
try this
On Sat, Apr 6, 2024 at 4:44 PM Moturi Bostone @.***>
wrote:

let me take a look
On Sat, Apr 6, 2024 at 4:35 PM Noah Zhu @.***> wrote:

okay let me check your documents and see where the problem is do you mind
if i see your work
… <#m_7435983581932783017_m_8141234859897622336_>
On Sat, Apr 6, 2024 at 3:56 PM Noah Zhu @.> wrote: have you tried
escaping the single quotes by doubling the single quotes like; MERGE
(n2:Entity {id: 'It''s better for technology companies to be run by product
people'}) which will tell your parser to treat the single quote in your
string as part of the string … <#m_6476712402078747728_> On Sat, Apr 6,
2024 at 3:10 PM Noah Zhu @.> wrote: Hi @M-Bostone
https://github.com/M-Bostone https://github.com/M-Bostone
https://github.com/M-Bostone https://github.com/M-Bostone
https://github.com/M-Bostone https://github.com/M-Bostone
https://github.com/M-Bostone For sure, I'm encountering some problem with
age that the behavior is little different with the Neo4j in some specific
case, I've already created a issue for this #1722
https://github.com/apache/age/issues/1722 <#1722
https://github.com/apache/age/issues/1722> <#1722
https://github.com/apache/age/issues/1722 <#1722
https://github.com/apache/age/issues/1722>> I'd appreciate some help.
Also I want to contribute to this project, but I need to learn more in
advance. — Reply to this email directly, view it on GitHub <#1705
https://github.com/apache/age/issues/1705 (comment) <#1705 (comment)
https://github.com/apache/age/issues/1705#issuecomment-2041065431>>, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/BFO2YCEMHQXK6WMEXQ25LTTY37Q2HAVCNFSM6AAAAABE4GDGHSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBRGA3DKNBTGE
https://github.com/notifications/unsubscribe-auth/BFO2YCEMHQXK6WMEXQ25LTTY37Q2HAVCNFSM6AAAAABE4GDGHSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBRGA3DKNBTGE
https://github.com/notifications/unsubscribe-auth/BFO2YCEMHQXK6WMEXQ25LTTY37Q2HAVCNFSM6AAAAABE4GDGHSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBRGA3DKNBTGE
https://github.com/notifications/unsubscribe-auth/BFO2YCEMHQXK6WMEXQ25LTTY37Q2HAVCNFSM6AAAAABE4GDGHSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBRGA3DKNBTGE
. You are receiving this because you were mentioned.Message ID: @.> -- men
I'm using the docker image which is provided on the github README.md for
some testing. I do can put the completed query and add like backslash, use
double quotes to wrap the string if the string contains single quotes or
use single quotes to wrap the string if the string contains double quotes.
But most of my time, I need to parameterize the queries that looks buggy,
especially with the python driver. And for now the problem from my side is
all the strings are from some documents, that means I need to process the
string in advance to put it as the parameters into the query, but that
doesn't work for now. There's no this kinds of problems when I use the
Neo4j. Also I can't create a vertex with a label contain single quotes
which works in Neo4j. — Reply to this email directly, view it on GitHub
<#1705 (comment)
https://github.com/apache/age/issues/1705#issuecomment-2041074897>, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/BFO2YCCQ7PVYHFUFGPDN44LY37WGLAVCNFSM6AAAAABE4GDGHSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBRGA3TIOBZG4
https://github.com/notifications/unsubscribe-auth/BFO2YCCQ7PVYHFUFGPDN44LY37WGLAVCNFSM6AAAAABE4GDGHSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBRGA3TIOBZG4
. You are receiving this because you were mentioned.Message ID: @.**>
I'm working with the llamaindex, use LLM(OpenAI Model) to extract some
contents to triplets like [subj, rel, obj], the contents are from any pdfs
or txts, so that means I can't fully control what the LLM extract for me,
maybe the subj contains some special chars, or rel and obj as well.
this is my python code
def upsert_triplet(self, subj: str, rel: str, obj: str) -> None:
    """Add triplet."""
    rel = rel.replace(" ", "_").upper()
    prepared_statement = f"""
        MERGE (n1:`{self.node_label}` {{id: %s}})
        MERGE (n2:`{self.node_label}` {{id: %s}})
        MERGE (n1)-[:`{rel}`]->(n2)
    """

    self._age.execCypher(prepared_statement, params=(subj, obj))
    self._age.commit()

the extracted data could be:
["I", "Learned", "It's better for technology companies to be run by product people"]
or maybe the subj or rel also includes single quotes or double quotes
["I", "include any '", "It's better for technology companies to be run by product people"]
There's no problem with this kind of data in Neo4j.
—
Reply to this email directly, view it on GitHub
https://github.com/apache/age/issues/1705#issuecomment-2041083817, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/BFO2YCAJJG2OD53YGL57NX3Y372ZLAVCNFSM6AAAAABE4GDGHSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBRGA4DGOBRG4
.
You are receiving this because you were mentioned.Message ID:
@.***>

sorry it took me this long to reply but i've got one of the slowest machines there is but try this: def upsert_triplet(self, subj: str, rel: str, obj: str) -> None: """Add triplet.""" rel = rel.replace(" ", "").upper() prepared_statement = f""" MERGE (n1:{self.node_label} {{id: $subj}}) MERGE (n2:{self.node_label} {{id: $obj}}) MERGE (n1)-[:{rel}]->(n2) """ self.age.execCypher(prepared_statement, params={"subj": subj, "obj": obj}) self.age.commit() try this On Sat, Apr 6, 2024 at 4:44 PM Moturi Bostone @.> wrote:
…
let me take a look On Sat, Apr 6, 2024 at 4:35 PM Noah Zhu @.> wrote: > okay let me check your documents and see where the problem is do you mind > if i see your work > … <#m_7435983581932783017_m_8141234859897622336> > On Sat, Apr 6, 2024 at 3:56 PM Noah Zhu @.*> wrote: have you tried > escaping the single quotes by doubling the single quotes like; MERGE > (n2:Entity {id: 'It''s better for technology companies to be run by product > people'}) which will tell your parser to treat the single quote in your > string as part of the string … <#m_6476712402078747728> On Sat, Apr 6, > 2024 at 3:10 PM Noah Zhu @.> wrote: Hi @M-Bostone > https://github.com/M-Bostone https://github.com/M-Bostone > https://github.com/M-Bostone https://github.com/M-Bostone > https://github.com/M-Bostone https://github.com/M-Bostone > https://github.com/M-Bostone For sure, I'm encountering some problem with > age that the behavior is little different with the Neo4j in some specific > case, I've already created a issue for this #1722 > <#1722> <#1722 > <#1722>> <#1722 > <#1722> <#1722 > <#1722>>> I'd appreciate some help. > Also I want to contribute to this project, but I need to learn more in > advance. — Reply to this email directly, view it on GitHub <#1705 > <#1705> (comment) <#1705 (comment) > <#1705 (comment)>>>, or > unsubscribe > https://github.com/notifications/unsubscribe-auth/BFO2YCEMHQXK6WMEXQ25LTTY37Q2HAVCNFSM6AAAAABE4GDGHSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBRGA3DKNBTGE > https://github.com/notifications/unsubscribe-auth/BFO2YCEMHQXK6WMEXQ25LTTY37Q2HAVCNFSM6AAAAABE4GDGHSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBRGA3DKNBTGE > https://github.com/notifications/unsubscribe-auth/BFO2YCEMHQXK6WMEXQ25LTTY37Q2HAVCNFSM6AAAAABE4GDGHSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBRGA3DKNBTGE > https://github.com/notifications/unsubscribe-auth/BFO2YCEMHQXK6WMEXQ25LTTY37Q2HAVCNFSM6AAAAABE4GDGHSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBRGA3DKNBTGE > . You are receiving this because you were mentioned.Message ID: @.> -- men > I'm using the docker image which is provided on the github README.md for > some testing. I do can put the completed query and add like backslash, use > double quotes to wrap the string if the string contains single quotes or > use single quotes to wrap the string if the string contains double quotes. > But most of my time, I need to parameterize the queries that looks buggy, > especially with the python driver. And for now the problem from my side is > all the strings are from some documents, that means I need to process the > string in advance to put it as the parameters into the query, but that > doesn't work for now. There's no this kinds of problems when I use the > Neo4j. Also I can't create a vertex with a label contain single quotes > which works in Neo4j. — Reply to this email directly, view it on GitHub > <#1705 (comment) > <#1705 (comment)>>, or > unsubscribe > https://github.com/notifications/unsubscribe-auth/BFO2YCCQ7PVYHFUFGPDN44LY37WGLAVCNFSM6AAAAABE4GDGHSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBRGA3TIOBZG4 > https://github.com/notifications/unsubscribe-auth/BFO2YCCQ7PVYHFUFGPDN44LY37WGLAVCNFSM6AAAAABE4GDGHSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBRGA3TIOBZG4 > . You are receiving this because you were mentioned.Message ID: @.***> > > I'm working with the llamaindex, use LLM(OpenAI Model) to extract some > contents to triplets like [subj, rel, obj], the contents are from any pdfs > or txts, so that means I can't fully control what the LLM extract for me, > maybe the subj contains some special chars, or rel and obj as well. > > this is my python code > > def upsert_triplet(self, subj: str, rel: str, obj: str) -> None: > """Add triplet.""" > rel = rel.replace(" ", "").upper() > prepared_statement = f""" > MERGE (n1:{self.node_label} {{id: %s}}) > MERGE (n2:{self.node_label} {{id: %s}}) > MERGE (n1)-[:{rel}]->(n2) > """ > > self._age.execCypher(prepared_statement, params=(subj, obj)) > self._age.commit() > > the extracted data could be: > > ["I", "Learned", "It's better for technology companies to be run by product people"] > > > or maybe the subj or rel also includes single quotes or double quotes > ["I", "include any '", "It's better for technology companies to be run by product people"] > > There's no problem with this kind of data in Neo4j. > > — > Reply to this email directly, view it on GitHub > <#1705 (comment)>, or > unsubscribe > https://github.com/notifications/unsubscribe-auth/BFO2YCAJJG2OD53YGL57NX3Y372ZLAVCNFSM6AAAAABE4GDGHSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBRGA4DGOBRG4 > . > You are receiving this because you were mentioned.Message ID: > @.***> >

It doesn't work for me
def upsert_triplet_test(subj: str, rel: str, obj: str) -> None:
    prepared_statement = f"""
        MERGE (n1:`Entity` {{id: $subj}})
        MERGE (n2:`Entity` {{id: $obj}})
        MERGE (n1)-[:`{rel.replace(" ", "_").upper()}`]->(n2)
    """

    ag.execCypher(prepared_statement, params={"subj": subj, "obj": obj})
    ag.commit()

upsert_triplet_test(
    "I",
    "Learned aa",
    "s 's better for technology companies to be run by product people",
)

I got this:
Traceback (most recent call last):
  File "/Users/noah/Projects/Python/age-test/.venv/lib/python3.11/site-packages/age/age.py", line 138, in execCypher
    cursor.execute(stmt)
psycopg2.errors.UndefinedParameter: parameters argument is missing from cypher() function call
LINE 1: SELECT * from cypher(NULL,NULL) as (v agtype);
                                        ^

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/noah/Projects/Python/age-test/main.py", line 142, in <module>
    upsert_triplet_test(
  File "/Users/noah/Projects/Python/age-test/main.py", line 138, in upsert_triplet_test
    ag.execCypher(prepared_statement, cols=[], params={"subj": subj, "obj": obj})
  File "/Users/noah/Projects/Python/age-test/.venv/lib/python3.11/site-packages/age/age.py", line 198, in execCypher
    return execCypher(self.connection, self.graphName, cypherStmt, cols=cols, params=params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/noah/Projects/Python/age-test/.venv/lib/python3.11/site-packages/age/age.py", line 145, in execCypher
    raise SqlExecutionError("Execution ERR[" + str(cause) +"](" + stmt +")", cause)
age.exceptions.SqlExecutionError: ('Execution ERR[parameters argument is missing from cypher() function call\nLINE 1: SELECT * from cypher(NULL,NULL) as (v agtype);\n                                        ^\n](SELECT * from cypher(NULL,NULL) as (v agtype);)', UndefinedParameter('parameters argument is missing from cypher() function call\nLINE 1: SELECT * from cypher(NULL,NULL) as (v agtype);\n                                        ^\n'))

I can find the document mentioned that we can use the $ sign for the prepared statement, but it's for postgres procedure. From my understand of the python driver that it is not procedure.
https://age.apache.org/age-manual/master/advanced/prepared_statements.html

i have encountered this once and the problem turned out to be a missing
parameters in the cypher function call
On Sat, Apr 6, 2024 at 9:29 PM Noah Zhu @.***> wrote:

sorry it took me this long to reply but i've got one of the slowest
machines there is but try this: def upsert_triplet(self, subj: str, rel:
str, obj: str) -> None: """Add triplet.""" rel = rel.replace(" ", "
").upper() prepared_statement = f""" MERGE (n1:{self.node_label} {{id:
$subj}}) MERGE (n2:{self.node_label} {{id: $obj}}) MERGE
(n1)-[:{rel}]->(n2) """ self.age.execCypher(prepared_statement,
params={"subj": subj, "obj": obj}) self.age.commit() try this On Sat, Apr
6, 2024 at 4:44 PM Moturi Bostone @.> wrote: … <#m_-5735751191410968667_>
let me take a look On Sat, Apr 6, 2024 at 4:35 PM Noah Zhu @.> wrote: >
okay let me check your documents and see where the problem is do you mind >
if i see your work > … <#m_7435983581932783017_m_8141234859897622336> > On
Sat, Apr 6, 2024 at 3:56 PM Noah Zhu @.> wrote: have you tried > escaping
the single quotes by doubling the single quotes like; MERGE > (n2:Entity
{id: 'It''s better for technology companies to be run by product >
people'}) which will tell your parser to treat the single quote in your >
string as part of the string … <#m_6476712402078747728> On Sat, Apr 6, >
2024 at 3:10 PM Noah Zhu @.> wrote: Hi @M-Bostone
https://github.com/M-Bostone > https://github.com/M-Bostone
https://github.com/M-Bostone https://github.com/M-Bostone
https://github.com/M-Bostone > https://github.com/M-Bostone
https://github.com/M-Bostone https://github.com/M-Bostone
https://github.com/M-Bostone > https://github.com/M-Bostone
https://github.com/M-Bostone https://github.com/M-Bostone
https://github.com/M-Bostone > https://github.com/M-Bostone
https://github.com/M-Bostone For sure, I'm encountering some problem with

age that the behavior is little different with the Neo4j in some specific
case, I've already created a issue for this #1722
https://github.com/apache/age/issues/1722 > <#1722
https://github.com/apache/age/issues/1722> <#1722
https://github.com/apache/age/issues/1722 > <#1722
https://github.com/apache/age/issues/1722>> <#1722
https://github.com/apache/age/issues/1722 > <#1722
https://github.com/apache/age/issues/1722> <#1722
https://github.com/apache/age/issues/1722 > <#1722
https://github.com/apache/age/issues/1722>>> I'd appreciate some help. >
Also I want to contribute to this project, but I need to learn more in >
advance. — Reply to this email directly, view it on GitHub <#1705
https://github.com/apache/age/issues/1705 > <#1705
https://github.com/apache/age/issues/1705> (comment) <#1705
https://github.com/apache/age/issues/1705 (comment) > <#1705 (comment)
https://github.com/apache/age/issues/1705#issuecomment-2041065431>>>, or
unsubscribe >
https://github.com/notifications/unsubscribe-auth/BFO2YCEMHQXK6WMEXQ25LTTY37Q2HAVCNFSM6AAAAABE4GDGHSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBRGA3DKNBTGE
https://github.com/notifications/unsubscribe-auth/BFO2YCEMHQXK6WMEXQ25LTTY37Q2HAVCNFSM6AAAAABE4GDGHSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBRGA3DKNBTGE

https://github.com/notifications/unsubscribe-auth/BFO2YCEMHQXK6WMEXQ25LTTY37Q2HAVCNFSM6AAAAABE4GDGHSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBRGA3DKNBTGE
https://github.com/notifications/unsubscribe-auth/BFO2YCEMHQXK6WMEXQ25LTTY37Q2HAVCNFSM6AAAAABE4GDGHSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBRGA3DKNBTGE

https://github.com/notifications/unsubscribe-auth/BFO2YCEMHQXK6WMEXQ25LTTY37Q2HAVCNFSM6AAAAABE4GDGHSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBRGA3DKNBTGE
https://github.com/notifications/unsubscribe-auth/BFO2YCEMHQXK6WMEXQ25LTTY37Q2HAVCNFSM6AAAAABE4GDGHSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBRGA3DKNBTGE

https://github.com/notifications/unsubscribe-auth/BFO2YCEMHQXK6WMEXQ25LTTY37Q2HAVCNFSM6AAAAABE4GDGHSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBRGA3DKNBTGE
https://github.com/notifications/unsubscribe-auth/BFO2YCEMHQXK6WMEXQ25LTTY37Q2HAVCNFSM6AAAAABE4GDGHSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBRGA3DKNBTGE

. You are receiving this because you were mentioned.Message ID: @.> --
men > I'm using the docker image which is provided on the github README.md
for > some testing. I do can put the completed query and add like
backslash, use > double quotes to wrap the string if the string contains
single quotes or > use single quotes to wrap the string if the string
contains double quotes. > But most of my time, I need to parameterize the
queries that looks buggy, > especially with the python driver. And for now
the problem from my side is > all the strings are from some documents, that
means I need to process the > string in advance to put it as the parameters
into the query, but that > doesn't work for now. There's no this kinds of
problems when I use the > Neo4j. Also I can't create a vertex with a label
contain single quotes > which works in Neo4j. — Reply to this email
directly, view it on GitHub > <#1705
https://github.com/apache/age/issues/1705 (comment) > <#1705 (comment)
https://github.com/apache/age/issues/1705#issuecomment-2041074897>>, or >
unsubscribe >
https://github.com/notifications/unsubscribe-auth/BFO2YCCQ7PVYHFUFGPDN44LY37WGLAVCNFSM6AAAAABE4GDGHSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBRGA3TIOBZG4
https://github.com/notifications/unsubscribe-auth/BFO2YCCQ7PVYHFUFGPDN44LY37WGLAVCNFSM6AAAAABE4GDGHSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBRGA3TIOBZG4

https://github.com/notifications/unsubscribe-auth/BFO2YCCQ7PVYHFUFGPDN44LY37WGLAVCNFSM6AAAAABE4GDGHSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBRGA3TIOBZG4
https://github.com/notifications/unsubscribe-auth/BFO2YCCQ7PVYHFUFGPDN44LY37WGLAVCNFSM6AAAAABE4GDGHSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBRGA3TIOBZG4

. You are receiving this because you were mentioned.Message ID: @.**> >
I'm working with the llamaindex, use LLM(OpenAI Model) to extract some >
contents to triplets like [subj, rel, obj], the contents are from any pdfs
or txts, so that means I can't fully control what the LLM extract for me,
maybe the subj contains some special chars, or rel and obj as well. > >
this is my python code > > def upsert_triplet(self, subj: str, rel: str,
obj: str) -> None: > """Add triplet.""" > rel = rel.replace(" ", "").upper()
prepared_statement = f""" > MERGE (n1:{self.node_label} {{id: %s}}) >
MERGE (n2:{self.node_label} {{id: %s}}) > MERGE (n1)-[:{rel}]->(n2) > """

self._age.execCypher(prepared_statement, params=(subj, obj)) >
self._age.commit() > > the extracted data could be: > > ["I", "Learned",
"It's better for technology companies to be run by product people"] > > >
or maybe the subj or rel also includes single quotes or double quotes >
["I", "include any '", "It's better for technology companies to be run by
product people"] > > There's no problem with this kind of data in Neo4j. >
— > Reply to this email directly, view it on GitHub > <#1705 (comment)
https://github.com/apache/age/issues/1705#issuecomment-2041083817>, or
unsubscribe >
https://github.com/notifications/unsubscribe-auth/BFO2YCAJJG2OD53YGL57NX3Y372ZLAVCNFSM6AAAAABE4GDGHSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBRGA4DGOBRG4
. > You are receiving this because you were mentioned.Message ID: > @.***>

It doesn't work for me
def upsert_triplet_test(subj: str, rel: str, obj: str) -> None:
prepared_statement = f"""
MERGE (n1:Entity {{id: $subj}})
MERGE (n2:Entity {{id: $obj}})
MERGE (n1)-[:{rel.replace(" ", "_").upper()}]->(n2)
"""
ag.execCypher(prepared_statement, params={"subj": subj, "obj": obj})
ag.commit()

upsert_triplet_test(
"I",
"Learned aa",
"s 's better for technology companies to be run by product people",
)
I got this:
Traceback (most recent call last):
File "/Users/noah/Projects/Python/age-test/.venv/lib/python3.11/site-packages/age/age.py", line 138, in execCypher
cursor.execute(stmt)
psycopg2.errors.UndefinedParameter: parameters argument is missing from cypher() function call
LINE 1: SELECT * from cypher(NULL,NULL) as (v agtype);
^
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/noah/Projects/Python/age-test/main.py", line 142, in
upsert_triplet_test(
File "/Users/noah/Projects/Python/age-test/main.py", line 138, in upsert_triplet_test
ag.execCypher(prepared_statement, cols=[], params={"subj": subj, "obj": obj})
File "/Users/noah/Projects/Python/age-test/.venv/lib/python3.11/site-packages/age/age.py", line 198, in execCypher
return execCypher(self.connection, self.graphName, cypherStmt, cols=cols, params=params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/noah/Projects/Python/age-test/.venv/lib/python3.11/site-packages/age/age.py", line 145, in execCypher
raise SqlExecutionError("Execution ERR[" + str(cause) +"](" + stmt +")", cause)
age.exceptions.SqlExecutionError: ('Execution ERR[parameters argument is missing from cypher() function call\nLINE 1: SELECT * from cypher(NULL,NULL) as (v agtype);\n                                        ^\n](SELECT * from cypher(NULL,NULL) as (v agtype);)', UndefinedParameter('parameters argument is missing from cypher() function call\nLINE 1: SELECT * from cypher(NULL,NULL) as (v agtype);\n                                        ^\n'))
I can find the document mentioned that we can use the $ sign for the
prepared statement, but it's for postgres procedure. From my understand of
the python driver that it is not procedure.
https://age.apache.org/age-manual/master/advanced/prepared_statements.html
—
Reply to this email directly, view it on GitHub
https://github.com/apache/age/issues/1705#issuecomment-2041161137, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/BFO2YCFZOWPG27XHNFOIDUTY4A5JRAVCNFSM6AAAAABE4GDGHSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBRGE3DCMJTG4
.
You are receiving this because you were mentioned.Message ID:
@.***>

make sure that the argument parameters are correctly included in Apache AGE
when calling the cypher function
On Sat, Apr 6, 2024 at 9:43 PM Moturi Bostone @.***>
wrote:

i have encountered this once and the problem turned out to be a missing
parameters in the cypher function call
On Sat, Apr 6, 2024 at 9:29 PM Noah Zhu @.***> wrote:

sorry it took me this long to reply but i've got one of the slowest
machines there is but try this: def upsert_triplet(self, subj: str, rel:
str, obj: str) -> None: """Add triplet.""" rel = rel.replace(" ", "
").upper() prepared_statement = f""" MERGE (n1:{self.node_label} {{id:
$subj}}) MERGE (n2:{self.node_label} {{id: $obj}}) MERGE
(n1)-[:{rel}]->(n2) """ self.age.execCypher(prepared_statement,
params={"subj": subj, "obj": obj}) self.age.commit() try this On Sat, Apr
6, 2024 at 4:44 PM Moturi Bostone @.> wrote: …
<#m_821820109361710640_m_-5735751191410968667_> let me take a look On Sat,
Apr 6, 2024 at 4:35 PM Noah Zhu @.> wrote: > okay let me check your
documents and see where the problem is do you mind > if i see your work > …
<#m_7435983581932783017_m_8141234859897622336> > On Sat, Apr 6, 2024 at
3:56 PM Noah Zhu @.> wrote: have you tried > escaping the single quotes by
doubling the single quotes like; MERGE > (n2:Entity {id: 'It''s better for
technology companies to be run by product > people'}) which will tell your
parser to treat the single quote in your > string as part of the string …
<#m_6476712402078747728> On Sat, Apr 6, > 2024 at 3:10 PM Noah Zhu @.>
wrote: Hi @M-Bostone https://github.com/M-Bostone >
https://github.com/M-Bostone https://github.com/M-Bostone
https://github.com/M-Bostone https://github.com/M-Bostone >
https://github.com/M-Bostone https://github.com/M-Bostone
https://github.com/M-Bostone https://github.com/M-Bostone >
https://github.com/M-Bostone https://github.com/M-Bostone
https://github.com/M-Bostone https://github.com/M-Bostone >
https://github.com/M-Bostone https://github.com/M-Bostone For sure, I'm
encountering some problem with > age that the behavior is little different
with the Neo4j in some specific > case, I've already created a issue for
this #1722 https://github.com/apache/age/issues/1722 > <#1722
https://github.com/apache/age/issues/1722> <#1722
https://github.com/apache/age/issues/1722 > <#1722
https://github.com/apache/age/issues/1722>> <#1722
https://github.com/apache/age/issues/1722 > <#1722
https://github.com/apache/age/issues/1722> <#1722
https://github.com/apache/age/issues/1722 > <#1722
https://github.com/apache/age/issues/1722>>> I'd appreciate some help. >
Also I want to contribute to this project, but I need to learn more in >
advance. — Reply to this email directly, view it on GitHub <#1705
https://github.com/apache/age/issues/1705 > <#1705
https://github.com/apache/age/issues/1705> (comment) <#1705
https://github.com/apache/age/issues/1705 (comment) > <#1705 (comment)
https://github.com/apache/age/issues/1705#issuecomment-2041065431>>>, or

unsubscribe >
https://github.com/notifications/unsubscribe-auth/BFO2YCEMHQXK6WMEXQ25LTTY37Q2HAVCNFSM6AAAAABE4GDGHSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBRGA3DKNBTGE
https://github.com/notifications/unsubscribe-auth/BFO2YCEMHQXK6WMEXQ25LTTY37Q2HAVCNFSM6AAAAABE4GDGHSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBRGA3DKNBTGE

https://github.com/notifications/unsubscribe-auth/BFO2YCEMHQXK6WMEXQ25LTTY37Q2HAVCNFSM6AAAAABE4GDGHSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBRGA3DKNBTGE
https://github.com/notifications/unsubscribe-auth/BFO2YCEMHQXK6WMEXQ25LTTY37Q2HAVCNFSM6AAAAABE4GDGHSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBRGA3DKNBTGE

https://github.com/notifications/unsubscribe-auth/BFO2YCEMHQXK6WMEXQ25LTTY37Q2HAVCNFSM6AAAAABE4GDGHSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBRGA3DKNBTGE
https://github.com/notifications/unsubscribe-auth/BFO2YCEMHQXK6WMEXQ25LTTY37Q2HAVCNFSM6AAAAABE4GDGHSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBRGA3DKNBTGE

https://github.com/notifications/unsubscribe-auth/BFO2YCEMHQXK6WMEXQ25LTTY37Q2HAVCNFSM6AAAAABE4GDGHSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBRGA3DKNBTGE
https://github.com/notifications/unsubscribe-auth/BFO2YCEMHQXK6WMEXQ25LTTY37Q2HAVCNFSM6AAAAABE4GDGHSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBRGA3DKNBTGE

. You are receiving this because you were mentioned.Message ID: @.> --
men > I'm using the docker image which is provided on the github README.md
for > some testing. I do can put the completed query and add like
backslash, use > double quotes to wrap the string if the string contains
single quotes or > use single quotes to wrap the string if the string
contains double quotes. > But most of my time, I need to parameterize the
queries that looks buggy, > especially with the python driver. And for now
the problem from my side is > all the strings are from some documents, that
means I need to process the > string in advance to put it as the parameters
into the query, but that > doesn't work for now. There's no this kinds of
problems when I use the > Neo4j. Also I can't create a vertex with a label
contain single quotes > which works in Neo4j. — Reply to this email
directly, view it on GitHub > <#1705
https://github.com/apache/age/issues/1705 (comment) > <#1705 (comment)
https://github.com/apache/age/issues/1705#issuecomment-2041074897>>, or >
unsubscribe >
https://github.com/notifications/unsubscribe-auth/BFO2YCCQ7PVYHFUFGPDN44LY37WGLAVCNFSM6AAAAABE4GDGHSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBRGA3TIOBZG4
https://github.com/notifications/unsubscribe-auth/BFO2YCCQ7PVYHFUFGPDN44LY37WGLAVCNFSM6AAAAABE4GDGHSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBRGA3TIOBZG4

https://github.com/notifications/unsubscribe-auth/BFO2YCCQ7PVYHFUFGPDN44LY37WGLAVCNFSM6AAAAABE4GDGHSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBRGA3TIOBZG4
https://github.com/notifications/unsubscribe-auth/BFO2YCCQ7PVYHFUFGPDN44LY37WGLAVCNFSM6AAAAABE4GDGHSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBRGA3TIOBZG4

. You are receiving this because you were mentioned.Message ID: @.> >
I'm working with the llamaindex, use LLM(OpenAI Model) to extract some >
contents to triplets like [subj, rel, obj], the contents are from any pdfs
or txts, so that means I can't fully control what the LLM extract for me,
maybe the subj contains some special chars, or rel and obj as well. > >
this is my python code > > def upsert_triplet(self, subj: str, rel: str,
obj: str) -> None: > """Add triplet.""" > rel = rel.replace(" ", "").upper()
prepared_statement = f""" > MERGE (n1:{self.node_label} {{id: %s}}) >
MERGE (n2:{self.node_label} {{id: %s}}) > MERGE (n1)-[:{rel}]->(n2) >
""" > > self._age.execCypher(prepared_statement, params=(subj, obj)) >
self._age.commit() > > the extracted data could be: > > ["I", "Learned",
"It's better for technology companies to be run by product people"] > > >
or maybe the subj or rel also includes single quotes or double quotes >
["I", "include any '", "It's better for technology companies to be run by
product people"] > > There's no problem with this kind of data in Neo4j. >
— > Reply to this email directly, view it on GitHub > <#1705 (comment)
https://github.com/apache/age/issues/1705#issuecomment-2041083817>, or
unsubscribe >
https://github.com/notifications/unsubscribe-auth/BFO2YCAJJG2OD53YGL57NX3Y372ZLAVCNFSM6AAAAABE4GDGHSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBRGA4DGOBRG4
. > You are receiving this because you were mentioned.Message ID: > @.*>

It doesn't work for me
def upsert_triplet_test(subj: str, rel: str, obj: str) -> None:
prepared_statement = f"""
MERGE (n1:Entity {{id: $subj}})
MERGE (n2:Entity {{id: $obj}})
MERGE (n1)-[:{rel.replace(" ", "_").upper()}]->(n2)
"""
ag.execCypher(prepared_statement, params={"subj": subj, "obj": obj})
ag.commit()

upsert_triplet_test(
"I",
"Learned aa",
"s 's better for technology companies to be run by product people",
)
I got this:
Traceback (most recent call last):
File "/Users/noah/Projects/Python/age-test/.venv/lib/python3.11/site-packages/age/age.py", line 138, in execCypher
cursor.execute(stmt)
psycopg2.errors.UndefinedParameter: parameters argument is missing from cypher() function call
LINE 1: SELECT * from cypher(NULL,NULL) as (v agtype);
^
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/noah/Projects/Python/age-test/main.py", line 142, in
upsert_triplet_test(
File "/Users/noah/Projects/Python/age-test/main.py", line 138, in upsert_triplet_test
ag.execCypher(prepared_statement, cols=[], params={"subj": subj, "obj": obj})
File "/Users/noah/Projects/Python/age-test/.venv/lib/python3.11/site-packages/age/age.py", line 198, in execCypher
return execCypher(self.connection, self.graphName, cypherStmt, cols=cols, params=params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/noah/Projects/Python/age-test/.venv/lib/python3.11/site-packages/age/age.py", line 145, in execCypher
raise SqlExecutionError("Execution ERR[" + str(cause) +"](" + stmt +")", cause)
age.exceptions.SqlExecutionError: ('Execution ERR[parameters argument is missing from cypher() function call\nLINE 1: SELECT * from cypher(NULL,NULL) as (v agtype);\n                                        ^\n](SELECT * from cypher(NULL,NULL) as (v agtype);)', UndefinedParameter('parameters argument is missing from cypher() function call\nLINE 1: SELECT * from cypher(NULL,NULL) as (v agtype);\n                                        ^\n'))
I can find the document mentioned that we can use the $ sign for the
prepared statement, but it's for postgres procedure. From my understand of
the python driver that it is not procedure.
https://age.apache.org/age-manual/master/advanced/prepared_statements.html
—
Reply to this email directly, view it on GitHub
https://github.com/apache/age/issues/1705#issuecomment-2041161137, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/BFO2YCFZOWPG27XHNFOIDUTY4A5JRAVCNFSM6AAAAABE4GDGHSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBRGE3DCMJTG4
.
You are receiving this because you were mentioned.Message ID:
@.***>

are you trying to compare between Apache AGE and neo4j,for you to use
Apache AGE, PostgreSQL has to be your primary SQL database
On Sat, Apr 6, 2024 at 9:45 PM Moturi Bostone @.***>
wrote:

make sure that the argument parameters are correctly included in Apache
AGE when calling the cypher function
On Sat, Apr 6, 2024 at 9:43 PM Moturi Bostone @.***>
wrote:

i have encountered this once and the problem turned out to be a missing
parameters in the cypher function call
On Sat, Apr 6, 2024 at 9:29 PM Noah Zhu @.***> wrote:

sorry it took me this long to reply but i've got one of the slowest
machines there is but try this: def upsert_triplet(self, subj: str, rel:
str, obj: str) -> None: """Add triplet.""" rel = rel.replace(" ", "
").upper() prepared_statement = f""" MERGE (n1:{self.node_label} {{id:
$subj}}) MERGE (n2:{self.node_label} {{id: $obj}}) MERGE
(n1)-[:{rel}]->(n2) """ self.age.execCypher(prepared_statement,
params={"subj": subj, "obj": obj}) self.age.commit() try this On Sat, Apr
6, 2024 at 4:44 PM Moturi Bostone @.> wrote: …
<#m_463412608644053527_m_821820109361710640_m_-5735751191410968667_> let me
take a look On Sat, Apr 6, 2024 at 4:35 PM Noah Zhu @.> wrote: > okay let
me check your documents and see where the problem is do you mind > if i see
your work > … <#m_7435983581932783017_m_8141234859897622336> > On Sat, Apr
6, 2024 at 3:56 PM Noah Zhu @.> wrote: have you tried > escaping the
single quotes by doubling the single quotes like; MERGE > (n2:Entity {id:
'It''s better for technology companies to be run by product > people'})
which will tell your parser to treat the single quote in your > string as
part of the string … <#m_6476712402078747728> On Sat, Apr 6, > 2024 at
3:10 PM Noah Zhu @.> wrote: Hi @M-Bostone https://github.com/M-Bostone >
https://github.com/M-Bostone https://github.com/M-Bostone
https://github.com/M-Bostone https://github.com/M-Bostone >
https://github.com/M-Bostone https://github.com/M-Bostone
https://github.com/M-Bostone https://github.com/M-Bostone >
https://github.com/M-Bostone https://github.com/M-Bostone
https://github.com/M-Bostone https://github.com/M-Bostone >
https://github.com/M-Bostone https://github.com/M-Bostone For sure, I'm
encountering some problem with > age that the behavior is little different
with the Neo4j in some specific > case, I've already created a issue for
this #1722 https://github.com/apache/age/issues/1722 > <#1722
https://github.com/apache/age/issues/1722> <#1722
https://github.com/apache/age/issues/1722 > <#1722
https://github.com/apache/age/issues/1722>> <#1722
https://github.com/apache/age/issues/1722 > <#1722
https://github.com/apache/age/issues/1722> <#1722
https://github.com/apache/age/issues/1722 > <#1722
https://github.com/apache/age/issues/1722>>> I'd appreciate some help. >
Also I want to contribute to this project, but I need to learn more in >
advance. — Reply to this email directly, view it on GitHub <#1705
https://github.com/apache/age/issues/1705 > <#1705
https://github.com/apache/age/issues/1705> (comment) <#1705
https://github.com/apache/age/issues/1705 (comment) > <#1705 (comment)
https://github.com/apache/age/issues/1705#issuecomment-2041065431>>>, or

unsubscribe >
https://github.com/notifications/unsubscribe-auth/BFO2YCEMHQXK6WMEXQ25LTTY37Q2HAVCNFSM6AAAAABE4GDGHSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBRGA3DKNBTGE
https://github.com/notifications/unsubscribe-auth/BFO2YCEMHQXK6WMEXQ25LTTY37Q2HAVCNFSM6AAAAABE4GDGHSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBRGA3DKNBTGE

https://github.com/notifications/unsubscribe-auth/BFO2YCEMHQXK6WMEXQ25LTTY37Q2HAVCNFSM6AAAAABE4GDGHSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBRGA3DKNBTGE
https://github.com/notifications/unsubscribe-auth/BFO2YCEMHQXK6WMEXQ25LTTY37Q2HAVCNFSM6AAAAABE4GDGHSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBRGA3DKNBTGE

https://github.com/notifications/unsubscribe-auth/BFO2YCEMHQXK6WMEXQ25LTTY37Q2HAVCNFSM6AAAAABE4GDGHSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBRGA3DKNBTGE
https://github.com/notifications/unsubscribe-auth/BFO2YCEMHQXK6WMEXQ25LTTY37Q2HAVCNFSM6AAAAABE4GDGHSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBRGA3DKNBTGE

https://github.com/notifications/unsubscribe-auth/BFO2YCEMHQXK6WMEXQ25LTTY37Q2HAVCNFSM6AAAAABE4GDGHSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBRGA3DKNBTGE
https://github.com/notifications/unsubscribe-auth/BFO2YCEMHQXK6WMEXQ25LTTY37Q2HAVCNFSM6AAAAABE4GDGHSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBRGA3DKNBTGE

. You are receiving this because you were mentioned.Message ID: @.> --
men > I'm using the docker image which is provided on the github README.md
for > some testing. I do can put the completed query and add like
backslash, use > double quotes to wrap the string if the string contains
single quotes or > use single quotes to wrap the string if the string
contains double quotes. > But most of my time, I need to parameterize the
queries that looks buggy, > especially with the python driver. And for now
the problem from my side is > all the strings are from some documents, that
means I need to process the > string in advance to put it as the parameters
into the query, but that > doesn't work for now. There's no this kinds of
problems when I use the > Neo4j. Also I can't create a vertex with a label
contain single quotes > which works in Neo4j. — Reply to this email
directly, view it on GitHub > <#1705
https://github.com/apache/age/issues/1705 (comment) > <#1705 (comment)
https://github.com/apache/age/issues/1705#issuecomment-2041074897>>, or >
unsubscribe >
https://github.com/notifications/unsubscribe-auth/BFO2YCCQ7PVYHFUFGPDN44LY37WGLAVCNFSM6AAAAABE4GDGHSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBRGA3TIOBZG4
https://github.com/notifications/unsubscribe-auth/BFO2YCCQ7PVYHFUFGPDN44LY37WGLAVCNFSM6AAAAABE4GDGHSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBRGA3TIOBZG4

https://github.com/notifications/unsubscribe-auth/BFO2YCCQ7PVYHFUFGPDN44LY37WGLAVCNFSM6AAAAABE4GDGHSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBRGA3TIOBZG4
https://github.com/notifications/unsubscribe-auth/BFO2YCCQ7PVYHFUFGPDN44LY37WGLAVCNFSM6AAAAABE4GDGHSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBRGA3TIOBZG4

. You are receiving this because you were mentioned.Message ID: @.> >
I'm working with the llamaindex, use LLM(OpenAI Model) to extract some >
contents to triplets like [subj, rel, obj], the contents are from any pdfs
or txts, so that means I can't fully control what the LLM extract for me,
maybe the subj contains some special chars, or rel and obj as well. > >
this is my python code > > def upsert_triplet(self, subj: str, rel: str,
obj: str) -> None: > """Add triplet.""" > rel = rel.replace(" ", "").upper()
prepared_statement = f""" > MERGE (n1:{self.node_label} {{id: %s}}) >
MERGE (n2:{self.node_label} {{id: %s}}) > MERGE (n1)-[:{rel}]->(n2) >
""" > > self._age.execCypher(prepared_statement, params=(subj, obj)) >
self._age.commit() > > the extracted data could be: > > ["I", "Learned",
"It's better for technology companies to be run by product people"] > > >
or maybe the subj or rel also includes single quotes or double quotes >
["I", "include any '", "It's better for technology companies to be run by
product people"] > > There's no problem with this kind of data in Neo4j. >
— > Reply to this email directly, view it on GitHub > <#1705 (comment)
https://github.com/apache/age/issues/1705#issuecomment-2041083817>,
or > unsubscribe >
https://github.com/notifications/unsubscribe-auth/BFO2YCAJJG2OD53YGL57NX3Y372ZLAVCNFSM6AAAAABE4GDGHSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBRGA4DGOBRG4
. > You are receiving this because you were mentioned.Message ID: >
@.*> >

It doesn't work for me
def upsert_triplet_test(subj: str, rel: str, obj: str) -> None:
prepared_statement = f"""
MERGE (n1:Entity {{id: $subj}})
MERGE (n2:Entity {{id: $obj}})
MERGE (n1)-[:{rel.replace(" ", "_").upper()}]->(n2)
"""
ag.execCypher(prepared_statement, params={"subj": subj, "obj": obj})
ag.commit()

upsert_triplet_test(
"I",
"Learned aa",
"s 's better for technology companies to be run by product people",
)
I got this:
Traceback (most recent call last):
File "/Users/noah/Projects/Python/age-test/.venv/lib/python3.11/site-packages/age/age.py", line 138, in execCypher
cursor.execute(stmt)
psycopg2.errors.UndefinedParameter: parameters argument is missing from cypher() function call
LINE 1: SELECT * from cypher(NULL,NULL) as (v agtype);
^
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/noah/Projects/Python/age-test/main.py", line 142, in
upsert_triplet_test(
File "/Users/noah/Projects/Python/age-test/main.py", line 138, in upsert_triplet_test
ag.execCypher(prepared_statement, cols=[], params={"subj": subj, "obj": obj})
File "/Users/noah/Projects/Python/age-test/.venv/lib/python3.11/site-packages/age/age.py", line 198, in execCypher
return execCypher(self.connection, self.graphName, cypherStmt, cols=cols, params=params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/noah/Projects/Python/age-test/.venv/lib/python3.11/site-packages/age/age.py", line 145, in execCypher
raise SqlExecutionError("Execution ERR[" + str(cause) +"](" + stmt +")", cause)
age.exceptions.SqlExecutionError: ('Execution ERR[parameters argument is missing from cypher() function call\nLINE 1: SELECT * from cypher(NULL,NULL) as (v agtype);\n                                        ^\n](SELECT * from cypher(NULL,NULL) as (v agtype);)', UndefinedParameter('parameters argument is missing from cypher() function call\nLINE 1: SELECT * from cypher(NULL,NULL) as (v agtype);\n                                        ^\n'))
I can find the document mentioned that we can use the $ sign for the
prepared statement, but it's for postgres procedure. From my understand of
the python driver that it is not procedure.
https://age.apache.org/age-manual/master/advanced/prepared_statements.html
—
Reply to this email directly, view it on GitHub
https://github.com/apache/age/issues/1705#issuecomment-2041161137, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/BFO2YCFZOWPG27XHNFOIDUTY4A5JRAVCNFSM6AAAAABE4GDGHSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBRGE3DCMJTG4
.
You are receiving this because you were mentioned.Message ID:
@.***>

did you manage to solve it
On Sat, Apr 6, 2024 at 11:33 PM Moturi Bostone @.***>
wrote:

are you trying to compare between Apache AGE and neo4j,for you to use
Apache AGE, PostgreSQL has to be your primary SQL database
On Sat, Apr 6, 2024 at 9:45 PM Moturi Bostone @.***>
wrote:

make sure that the argument parameters are correctly included in Apache
AGE when calling the cypher function
On Sat, Apr 6, 2024 at 9:43 PM Moturi Bostone @.***>
wrote:

i have encountered this once and the problem turned out to be a missing
parameters in the cypher function call
On Sat, Apr 6, 2024 at 9:29 PM Noah Zhu @.***>
wrote:

sorry it took me this long to reply but i've got one of the slowest
machines there is but try this: def upsert_triplet(self, subj: str, rel:
str, obj: str) -> None: """Add triplet.""" rel = rel.replace(" ", "
").upper() prepared_statement = f""" MERGE (n1:{self.node_label} {{id:
$subj}}) MERGE (n2:{self.node_label} {{id: $obj}}) MERGE
(n1)-[:{rel}]->(n2) """ self.age.execCypher(prepared_statement,
params={"subj": subj, "obj": obj}) self.age.commit() try this On Sat, Apr
6, 2024 at 4:44 PM Moturi Bostone @.> wrote: …
<#m_5946786648096769430_m_463412608644053527_m_821820109361710640_m_-5735751191410968667_>
let me take a look On Sat, Apr 6, 2024 at 4:35 PM Noah Zhu @.> wrote: >
okay let me check your documents and see where the problem is do you mind >
if i see your work > … <#m_7435983581932783017_m_8141234859897622336> > On
Sat, Apr 6, 2024 at 3:56 PM Noah Zhu @.> wrote: have you tried > escaping
the single quotes by doubling the single quotes like; MERGE > (n2:Entity
{id: 'It''s better for technology companies to be run by product >
people'}) which will tell your parser to treat the single quote in your >
string as part of the string … <#m_6476712402078747728> On Sat, Apr 6, >
2024 at 3:10 PM Noah Zhu @.> wrote: Hi @M-Bostone
https://github.com/M-Bostone > https://github.com/M-Bostone
https://github.com/M-Bostone https://github.com/M-Bostone
https://github.com/M-Bostone > https://github.com/M-Bostone
https://github.com/M-Bostone https://github.com/M-Bostone
https://github.com/M-Bostone > https://github.com/M-Bostone
https://github.com/M-Bostone https://github.com/M-Bostone
https://github.com/M-Bostone > https://github.com/M-Bostone
https://github.com/M-Bostone For sure, I'm encountering some problem with

age that the behavior is little different with the Neo4j in some specific
case, I've already created a issue for this #1722
https://github.com/apache/age/issues/1722 > <#1722
https://github.com/apache/age/issues/1722> <#1722
https://github.com/apache/age/issues/1722 > <#1722
https://github.com/apache/age/issues/1722>> <#1722
https://github.com/apache/age/issues/1722 > <#1722
https://github.com/apache/age/issues/1722> <#1722
https://github.com/apache/age/issues/1722 > <#1722
https://github.com/apache/age/issues/1722>>> I'd appreciate some help. >
Also I want to contribute to this project, but I need to learn more in >
advance. — Reply to this email directly, view it on GitHub <#1705
https://github.com/apache/age/issues/1705 > <#1705
https://github.com/apache/age/issues/1705> (comment) <#1705
https://github.com/apache/age/issues/1705 (comment) > <#1705 (comment)
https://github.com/apache/age/issues/1705#issuecomment-2041065431>>>, or
unsubscribe >
https://github.com/notifications/unsubscribe-auth/BFO2YCEMHQXK6WMEXQ25LTTY37Q2HAVCNFSM6AAAAABE4GDGHSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBRGA3DKNBTGE
https://github.com/notifications/unsubscribe-auth/BFO2YCEMHQXK6WMEXQ25LTTY37Q2HAVCNFSM6AAAAABE4GDGHSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBRGA3DKNBTGE

https://github.com/notifications/unsubscribe-auth/BFO2YCEMHQXK6WMEXQ25LTTY37Q2HAVCNFSM6AAAAABE4GDGHSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBRGA3DKNBTGE
https://github.com/notifications/unsubscribe-auth/BFO2YCEMHQXK6WMEXQ25LTTY37Q2HAVCNFSM6AAAAABE4GDGHSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBRGA3DKNBTGE

https://github.com/notifications/unsubscribe-auth/BFO2YCEMHQXK6WMEXQ25LTTY37Q2HAVCNFSM6AAAAABE4GDGHSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBRGA3DKNBTGE
https://github.com/notifications/unsubscribe-auth/BFO2YCEMHQXK6WMEXQ25LTTY37Q2HAVCNFSM6AAAAABE4GDGHSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBRGA3DKNBTGE

https://github.com/notifications/unsubscribe-auth/BFO2YCEMHQXK6WMEXQ25LTTY37Q2HAVCNFSM6AAAAABE4GDGHSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBRGA3DKNBTGE
https://github.com/notifications/unsubscribe-auth/BFO2YCEMHQXK6WMEXQ25LTTY37Q2HAVCNFSM6AAAAABE4GDGHSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBRGA3DKNBTGE

. You are receiving this because you were mentioned.Message ID: @.> --
men > I'm using the docker image which is provided on the github README.md
for > some testing. I do can put the completed query and add like
backslash, use > double quotes to wrap the string if the string contains
single quotes or > use single quotes to wrap the string if the string
contains double quotes. > But most of my time, I need to parameterize the
queries that looks buggy, > especially with the python driver. And for now
the problem from my side is > all the strings are from some documents, that
means I need to process the > string in advance to put it as the parameters
into the query, but that > doesn't work for now. There's no this kinds of
problems when I use the > Neo4j. Also I can't create a vertex with a label
contain single quotes > which works in Neo4j. — Reply to this email
directly, view it on GitHub > <#1705
https://github.com/apache/age/issues/1705 (comment) > <#1705 (comment)
https://github.com/apache/age/issues/1705#issuecomment-2041074897>>, or >
unsubscribe >
https://github.com/notifications/unsubscribe-auth/BFO2YCCQ7PVYHFUFGPDN44LY37WGLAVCNFSM6AAAAABE4GDGHSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBRGA3TIOBZG4
https://github.com/notifications/unsubscribe-auth/BFO2YCCQ7PVYHFUFGPDN44LY37WGLAVCNFSM6AAAAABE4GDGHSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBRGA3TIOBZG4

https://github.com/notifications/unsubscribe-auth/BFO2YCCQ7PVYHFUFGPDN44LY37WGLAVCNFSM6AAAAABE4GDGHSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBRGA3TIOBZG4
https://github.com/notifications/unsubscribe-auth/BFO2YCCQ7PVYHFUFGPDN44LY37WGLAVCNFSM6AAAAABE4GDGHSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBRGA3TIOBZG4

. You are receiving this because you were mentioned.Message ID: @.> >
I'm working with the llamaindex, use LLM(OpenAI Model) to extract some >
contents to triplets like [subj, rel, obj], the contents are from any pdfs
or txts, so that means I can't fully control what the LLM extract for me,
maybe the subj contains some special chars, or rel and obj as well. > >
this is my python code > > def upsert_triplet(self, subj: str, rel: str,
obj: str) -> None: > """Add triplet.""" > rel = rel.replace(" ", "").upper()
prepared_statement = f""" > MERGE (n1:{self.node_label} {{id: %s}})
MERGE (n2:{self.node_label} {{id: %s}}) > MERGE (n1)-[:{rel}]->(n2)
""" > > self._age.execCypher(prepared_statement, params=(subj, obj)) >
self._age.commit() > > the extracted data could be: > > ["I", "Learned",
"It's better for technology companies to be run by product people"] > > >
or maybe the subj or rel also includes single quotes or double quotes >
["I", "include any '", "It's better for technology companies to be run by
product people"] > > There's no problem with this kind of data in Neo4j. >
— > Reply to this email directly, view it on GitHub > <#1705
(comment)
https://github.com/apache/age/issues/1705#issuecomment-2041083817>,
or > unsubscribe >
https://github.com/notifications/unsubscribe-auth/BFO2YCAJJG2OD53YGL57NX3Y372ZLAVCNFSM6AAAAABE4GDGHSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBRGA4DGOBRG4
. > You are receiving this because you were mentioned.Message ID: >
@.*> >

It doesn't work for me
def upsert_triplet_test(subj: str, rel: str, obj: str) -> None:
prepared_statement = f"""
MERGE (n1:Entity {{id: $subj}})
MERGE (n2:Entity {{id: $obj}})
MERGE (n1)-[:{rel.replace(" ", "_").upper()}]->(n2)
"""
ag.execCypher(prepared_statement, params={"subj": subj, "obj": obj})
ag.commit()

upsert_triplet_test(
"I",
"Learned aa",
"s 's better for technology companies to be run by product people",
)
I got this:
Traceback (most recent call last):
File "/Users/noah/Projects/Python/age-test/.venv/lib/python3.11/site-packages/age/age.py", line 138, in execCypher
cursor.execute(stmt)
psycopg2.errors.UndefinedParameter: parameters argument is missing from cypher() function call
LINE 1: SELECT * from cypher(NULL,NULL) as (v agtype);
^
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/noah/Projects/Python/age-test/main.py", line 142, in
upsert_triplet_test(
File "/Users/noah/Projects/Python/age-test/main.py", line 138, in upsert_triplet_test
ag.execCypher(prepared_statement, cols=[], params={"subj": subj, "obj": obj})
File "/Users/noah/Projects/Python/age-test/.venv/lib/python3.11/site-packages/age/age.py", line 198, in execCypher
return execCypher(self.connection, self.graphName, cypherStmt, cols=cols, params=params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/noah/Projects/Python/age-test/.venv/lib/python3.11/site-packages/age/age.py", line 145, in execCypher
raise SqlExecutionError("Execution ERR[" + str(cause) +"](" + stmt +")", cause)
age.exceptions.SqlExecutionError: ('Execution ERR[parameters argument is missing from cypher() function call\nLINE 1: SELECT * from cypher(NULL,NULL) as (v agtype);\n                                        ^\n](SELECT * from cypher(NULL,NULL) as (v agtype);)', UndefinedParameter('parameters argument is missing from cypher() function call\nLINE 1: SELECT * from cypher(NULL,NULL) as (v agtype);\n                                        ^\n'))
I can find the document mentioned that we can use the $ sign for the
prepared statement, but it's for postgres procedure. From my understand of
the python driver that it is not procedure.
https://age.apache.org/age-manual/master/advanced/prepared_statements.html
—
Reply to this email directly, view it on GitHub
https://github.com/apache/age/issues/1705#issuecomment-2041161137,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/BFO2YCFZOWPG27XHNFOIDUTY4A5JRAVCNFSM6AAAAABE4GDGHSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBRGE3DCMJTG4
.
You are receiving this because you were mentioned.Message ID:
@.***>

did you manage to solve it On Sat, Apr 6, 2024 at 11:33 PM Moturi Bostone @.> wrote:
…
are you trying to compare between Apache AGE and neo4j,for you to use Apache AGE, PostgreSQL has to be your primary SQL database On Sat, Apr 6, 2024 at 9:45 PM Moturi Bostone @.> wrote: > make sure that the argument parameters are correctly included in Apache > AGE when calling the cypher function > > On Sat, Apr 6, 2024 at 9:43 PM Moturi Bostone @.> > wrote: > >> i have encountered this once and the problem turned out to be a missing >> parameters in the cypher function call >> >> On Sat, Apr 6, 2024 at 9:29 PM Noah Zhu @.> >> wrote: >> >>> sorry it took me this long to reply but i've got one of the slowest >>> machines there is but try this: def upsert_triplet(self, subj: str, rel: >>> str, obj: str) -> None: """Add triplet.""" rel = rel.replace(" ", " >>> >>> ").upper() prepared_statement = f""" MERGE (n1:{self.node_label} {{id: >>> $subj}}) MERGE (n2:{self.node_label} {{id: $obj}}) MERGE >>> (n1)-[:{rel}]->(n2) """ self.age.execCypher(prepared_statement, >>> params={"subj": subj, "obj": obj}) self.age.commit() try this On Sat, Apr >>> 6, 2024 at 4:44 PM Moturi Bostone @.> wrote: … >>> <#m_5946786648096769430_m_463412608644053527_m_821820109361710640_m_-5735751191410968667_> >>> let me take a look On Sat, Apr 6, 2024 at 4:35 PM Noah Zhu @.> wrote: > >>> okay let me check your documents and see where the problem is do you mind > >>> if i see your work > … <#m_7435983581932783017_m_8141234859897622336> > On >>> Sat, Apr 6, 2024 at 3:56 PM Noah Zhu @.> wrote: have you tried > escaping >>> the single quotes by doubling the single quotes like; MERGE > (n2:Entity >>> {id: 'It''s better for technology companies to be run by product > >>> people'}) which will tell your parser to treat the single quote in your > >>> string as part of the string … <#m_6476712402078747728> On Sat, Apr 6, > >>> 2024 at 3:10 PM Noah Zhu @.> wrote: Hi @M-Bostone >>> https://github.com/M-Bostone > https://github.com/M-Bostone >>> https://github.com/M-Bostone https://github.com/M-Bostone >>> https://github.com/M-Bostone > https://github.com/M-Bostone >>> https://github.com/M-Bostone https://github.com/M-Bostone >>> https://github.com/M-Bostone > https://github.com/M-Bostone >>> https://github.com/M-Bostone https://github.com/M-Bostone >>> https://github.com/M-Bostone > https://github.com/M-Bostone >>> https://github.com/M-Bostone For sure, I'm encountering some problem with >>> > age that the behavior is little different with the Neo4j in some specific >>> > case, I've already created a issue for this #1722 >>> <#1722> > <#1722 >>> <#1722>> <#1722 >>> <#1722> > <#1722 >>> <#1722>>> <#1722 >>> <#1722> > <#1722 >>> <#1722>> <#1722 >>> <#1722> > <#1722 >>> <#1722>>>> I'd appreciate some help. > >>> Also I want to contribute to this project, but I need to learn more in > >>> advance. — Reply to this email directly, view it on GitHub <#1705 >>> <#1705> > <#1705 >>> <#1705>> (comment) <#1705 >>> <#1705> (comment) > <#1705 (comment) >>> <#1705 (comment)>>>>, or >>> > unsubscribe > >>> https://github.com/notifications/unsubscribe-auth/BFO2YCEMHQXK6WMEXQ25LTTY37Q2HAVCNFSM6AAAAABE4GDGHSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBRGA3DKNBTGE >>> https://github.com/notifications/unsubscribe-auth/BFO2YCEMHQXK6WMEXQ25LTTY37Q2HAVCNFSM6AAAAABE4GDGHSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBRGA3DKNBTGE >>> > >>> https://github.com/notifications/unsubscribe-auth/BFO2YCEMHQXK6WMEXQ25LTTY37Q2HAVCNFSM6AAAAABE4GDGHSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBRGA3DKNBTGE >>> https://github.com/notifications/unsubscribe-auth/BFO2YCEMHQXK6WMEXQ25LTTY37Q2HAVCNFSM6AAAAABE4GDGHSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBRGA3DKNBTGE >>> > >>> https://github.com/notifications/unsubscribe-auth/BFO2YCEMHQXK6WMEXQ25LTTY37Q2HAVCNFSM6AAAAABE4GDGHSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBRGA3DKNBTGE >>> https://github.com/notifications/unsubscribe-auth/BFO2YCEMHQXK6WMEXQ25LTTY37Q2HAVCNFSM6AAAAABE4GDGHSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBRGA3DKNBTGE >>> > >>> https://github.com/notifications/unsubscribe-auth/BFO2YCEMHQXK6WMEXQ25LTTY37Q2HAVCNFSM6AAAAABE4GDGHSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBRGA3DKNBTGE >>> https://github.com/notifications/unsubscribe-auth/BFO2YCEMHQXK6WMEXQ25LTTY37Q2HAVCNFSM6AAAAABE4GDGHSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBRGA3DKNBTGE >>> > . You are receiving this because you were mentioned.Message ID: @.> -- >>> men > I'm using the docker image which is provided on the github README.md >>> for > some testing. I do can put the completed query and add like >>> backslash, use > double quotes to wrap the string if the string contains >>> single quotes or > use single quotes to wrap the string if the string >>> contains double quotes. > But most of my time, I need to parameterize the >>> queries that looks buggy, > especially with the python driver. And for now >>> the problem from my side is > all the strings are from some documents, that >>> means I need to process the > string in advance to put it as the parameters >>> into the query, but that > doesn't work for now. There's no this kinds of >>> problems when I use the > Neo4j. Also I can't create a vertex with a label >>> contain single quotes > which works in Neo4j. — Reply to this email >>> directly, view it on GitHub > <#1705 >>> <#1705> (comment) > <#1705 (comment) >>> <#1705 (comment)>>>, or > >>> unsubscribe > >>> https://github.com/notifications/unsubscribe-auth/BFO2YCCQ7PVYHFUFGPDN44LY37WGLAVCNFSM6AAAAABE4GDGHSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBRGA3TIOBZG4 >>> https://github.com/notifications/unsubscribe-auth/BFO2YCCQ7PVYHFUFGPDN44LY37WGLAVCNFSM6AAAAABE4GDGHSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBRGA3TIOBZG4 >>> > >>> https://github.com/notifications/unsubscribe-auth/BFO2YCCQ7PVYHFUFGPDN44LY37WGLAVCNFSM6AAAAABE4GDGHSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBRGA3TIOBZG4 >>> https://github.com/notifications/unsubscribe-auth/BFO2YCCQ7PVYHFUFGPDN44LY37WGLAVCNFSM6AAAAABE4GDGHSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBRGA3TIOBZG4 >>> > . You are receiving this because you were mentioned.Message ID: @.> > >>> > I'm working with the llamaindex, use LLM(OpenAI Model) to extract some > >>> contents to triplets like [subj, rel, obj], the contents are from any pdfs >>> > or txts, so that means I can't fully control what the LLM extract for me, >>> > maybe the subj contains some special chars, or rel and obj as well. > > >>> this is my python code > > def upsert_triplet(self, subj: str, rel: str, >>> obj: str) -> None: > """Add triplet.""" > rel = rel.replace(" ", "").upper() >>> > prepared_statement = f""" > MERGE (n1:{self.node_label} {{id: %s}}) >>> > MERGE (n2:{self.node_label} {{id: %s}}) > MERGE (n1)-[:{rel}]->(n2) >>> > """ > > self._age.execCypher(prepared_statement, params=(subj, obj)) > >>> self._age.commit() > > the extracted data could be: > > ["I", "Learned", >>> "It's better for technology companies to be run by product people"] > > > >>> or maybe the subj or rel also includes single quotes or double quotes > >>> ["I", "include any '", "It's better for technology companies to be run by >>> product people"] > > There's no problem with this kind of data in Neo4j. > >>> > — > Reply to this email directly, view it on GitHub > <#1705 >>> (comment) >>> <#1705 (comment)>>, >>> or > unsubscribe > >>> https://github.com/notifications/unsubscribe-auth/BFO2YCAJJG2OD53YGL57NX3Y372ZLAVCNFSM6AAAAABE4GDGHSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBRGA4DGOBRG4 >>> > . > You are receiving this because you were mentioned.Message ID: > >>> @.> > >>> >>> It doesn't work for me >>> >>> def upsert_triplet_test(subj: str, rel: str, obj: str) -> None: >>> prepared_statement = f""" >>> MERGE (n1:Entity {{id: $subj}}) >>> MERGE (n2:Entity {{id: $obj}}) >>> MERGE (n1)-[:{rel.replace(" ", "_").upper()}]->(n2) >>> """ >>> >>> ag.execCypher(prepared_statement, params={"subj": subj, "obj": obj}) >>> ag.commit() >>> >>> >>> upsert_triplet_test( >>> "I", >>> "Learned aa", >>> "s 's better for technology companies to be run by product people", >>> ) >>> >>> I got this: >>> >>> Traceback (most recent call last): >>> File "/Users/noah/Projects/Python/age-test/.venv/lib/python3.11/site-packages/age/age.py", line 138, in execCypher >>> cursor.execute(stmt) >>> psycopg2.errors.UndefinedParameter: parameters argument is missing from cypher() function call >>> LINE 1: SELECT * from cypher(NULL,NULL) as (v agtype); >>> ^ >>> >>> >>> During handling of the above exception, another exception occurred: >>> >>> Traceback (most recent call last): >>> File "/Users/noah/Projects/Python/age-test/main.py", line 142, in  >>> upsert_triplet_test( >>> File "/Users/noah/Projects/Python/age-test/main.py", line 138, in upsert_triplet_test >>> ag.execCypher(prepared_statement, cols=[], params={"subj": subj, "obj": obj}) >>> File "/Users/noah/Projects/Python/age-test/.venv/lib/python3.11/site-packages/age/age.py", line 198, in execCypher >>> return execCypher(self.connection, self.graphName, cypherStmt, cols=cols, params=params) >>> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >>> File "/Users/noah/Projects/Python/age-test/.venv/lib/python3.11/site-packages/age/age.py", line 145, in execCypher >>> raise SqlExecutionError("Execution ERR[" + str(cause) +"](" + stmt +")", cause) >>> age.exceptions.SqlExecutionError: ('Execution ERR[parameters argument is missing from cypher() function call\nLINE 1: SELECT * from cypher(NULL,NULL) as (v agtype);\n ^\n](SELECT * from cypher(NULL,NULL) as (v agtype);)', UndefinedParameter('parameters argument is missing from cypher() function call\nLINE 1: SELECT * from cypher(NULL,NULL) as (v agtype);\n ^\n')) >>> >>> >>> I can find the document mentioned that we can use the $ sign for the >>> prepared statement, but it's for postgres procedure. From my understand of >>> the python driver that it is not procedure. >>> >>> >>> https://age.apache.org/age-manual/master/advanced/prepared_statements.html >>> >>> — >>> Reply to this email directly, view it on GitHub >>> <#1705 (comment)>, >>> or unsubscribe >>> https://github.com/notifications/unsubscribe-auth/BFO2YCFZOWPG27XHNFOIDUTY4A5JRAVCNFSM6AAAAABE4GDGHSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBRGE3DCMJTG4 >>> . >>> You are receiving this because you were mentioned.Message ID: >>> @.**> >>> >>

not yet, this solution is not faisable for me due to I'm going to contribute to this to a open source project.

okay, what is your primary database

okay, what is your primary database

I'm working on a project with LlamaIndex for RAG, in LlamaIndex we can integrate a graph store with Neo4j, Nebula etc. Current I'm using the Neo4j community edition, but there're some restrictions with it, so I'm seeking an alternative for it. After some investigations, I found this age extension PG, we can use this as a graph store, so I want to move to this, but current LlamaIndex doesn't support it, so I want to contribute this to LlamaIndex. I've already implemented this integration, before I create the pull request, I need to do some tests for it, then I encountered this problems(like the single quote problem which doesn't exist in Neo4j) with age during the testing.

@noahxzhu thanks for looking into it. i would also like to settle on one db tenchnology for rag. also not sure you are aware of https://github.com/langchain-ai/langchain/pull/20582

@noahxzhu thanks for looking into it. i would also like to settle on one db tenchnology for rag. also not sure you are aware of langchain-ai/langchain#20582

This is awesome. Thank you for your work @stdweird

@noahxzhu thanks for looking into it. i would also like to settle on one db tenchnology for rag. also not sure you are aware of langchain-ai/langchain#20582

@stdweird I checked the source code, and this implementation has made a tricky workaround: it removed all the special characters from the label using re.compile("[^0-9a-zA-Z]+"). Yes, that will work, but I think AGE should support special characters in labels. @markgomer, at least I think the python driver is buggy for this kind of special cases.

@noahxzhu ofcourse it should support all characters in the labels. it is up to you to either fix this first and then make the llamaindex PR, or make a PR with this known limitation, and make another PR to fix it in the (near) future. i can't estimate how much owrk and/or how long this might take.
personally i want to use AGE in the future, but i can continue my tests with neo4j

I am in a duo with another colleague on college and we are using Apache AGE to develop a website for our term paper. We have made some comparisons between the standard ANSI SQL and SQL with Cypher, showing that AGE has a more understandable syntax, works on top of PostgreSQL, which is a grant advantage since other companies already use it, and it can complete the same queries almost in the same amount of time with less complexity.
On the 1st of April we presented our project on a Workshop of Technological Tendencies and on the 5th of June we presented the poster of the project. On both events we received valuable feedbacks from other professors.

My number one reason is because AGE is built on top of Postgres. Most of our relational data is already in Postgres so AGE enables the combination of SQL and Cypher, very powerful.
The biggest challenge I'm having with AGE is trying to extend AGE with search capability. I'm using ParadeDB's pg_bm25 extension but it can't index AGE's agtype data. My ultimate goal is to integrate AGE with LLM but it needs searching capability(both bm25 and vector search).
For reference, these are the use cases I need. https://neo4j.com/blog/unifying-llm-knowledge-graph/

New to all this so forgive me if this question reveals my naivety, but what's stopping you from indexing your data using something like ElasticSearch or Solr? Is it that you are trying to use Postgres as a one stop shop?

I'm Matthew from Altitude Labs, we are building a cyber security product that conducts automated misconfiguration and gap detection. We initially built our MVP in neo4j but I faced the problem that I wanted to be able to fetch information from both a relational database and graph within the same query. I've been hunting for a solution for a while now and just stumbled on AGE today. Now looking at refactoring our system to migrate from Neo4j to AGE as it seems to solve a lot of our problems when trying to do analysis across the graph and tabular data.


[feature request] Add Go Client

Hi I am one of the contributors of Kubeflow Katib, we are using modeldb as storage backend to store models. Currently, we maintain a go client https://github.com/kubeflow/katib/tree/master/pkg/manager/modelstore/modeldb, which is auto-generated by Thrift Compiler.
I think it will be better to maintain a formal go client in modeldb repository, for version control and consistency.

/cc @mpvartak


MacOS res/Asa: command not found

I decompressed Asa-macos-2.1.12-beta into a folder on my desktop and open terminal set to that location
I enter ls and can see the two shell scripts:
AsaLaunch.sh and AsaLaunchGui.sh
and the res directory.
I type in sh ./AsaLaunch.sh and enter my password for sudo from the .sh script.
It displays:
sudo: res/Asa: command not found
I can see that the Asa executable has execute permissions for me.

What obvious mistake am I making?  Maybe the folder should be located somewhere else or needs to have some permission set or a path set somewhere?

For using the command line version, are there any example scripts where the drive to be scanned is specified?  I can specify Windows drives, but am unfamiliar with MacOS usage.

I can see the volumes using cd /volumes, then ls - but ... possibly there is some tricky syntax to specify the volume that is second nature to someone familiar with unix?

Besides monitoring before and after a program's installation, my intended purpose is to scan my boot drive and then scan a Carbon Copy of the boot drive and compare them.

I'm trying to account for 100GB of missing data on the Carbon Copy drive, and want to insure it's just temp files (from Logic Pro Sound Library Manager installs - or something I don't need.
Thanks!

Similar to #287.

Hey @exqiorentibus,
Thank you for your report.

I'll investigate this.  For now, please try running Asa directly without the script and let me know if that works for you.

The Mac OS File system is rooted at / with specific volumes at "/Volumes" you would just specify the directory in /Volumes you were interested in. For example: sudo asa collect -f -directories "/Volumes/Location" Alternately you can just run sudo asa collect -f to gather everything in /

Note that ASA uses the absolute path as the "Identity" of a collected file object.

For example, there is currently no capability to compare: /Volumes/Directory1 to /Volumes/Directory2, it would detect that those are two entirely separate folders..

While in the folder with asa, I tried using terminal:
sudo asa gui
and got:
asa: gui: no such file or directory
Also tried sudo asa --version and help, etc. - with the same result
When I double clicked on the asa executable, it gives me a terminal window that shows:
Asa 2.1.12-beta+141cb8dc4b and a copyright
....
no verb selected
So, it does seem to have all the components and it does run.
   For neophytes, some basic MacOS script examples might be useful?
--
As to #3, if I boot from the Carbon Copy backup, will the absolute path the be same, or will there be an issue with the volume name being different?  I can't really remove or disable the main boot volume as it's an NVMe seated on the motherboard (Gigabyte lets me disable a SATA but not the NVMe for some reason?).
I just can't figure out where the missing files are using the tools that I have -the SSD seems identical when using Path Finder's Size Browser and the 'Volume Disk Usage Details' utility from Bombich (Carbon Copy's developer),  But the 'info' button in Disk Utility shows 100GB less  free space on the copy and about 900 less files. I'm perplexed?
It's not useful to compare a before and after of the same drive in this case as the 'before' is on the main drive and the 'after' is the Carbon Copy (in theory) identical backup of the main drive.
Maybe an 'optional override' option could be added so that different volumes could be compared?
I can think of situations on Windows where I'd also like to compare files on different volumes, like when moving a large data volume with 1000's of files using Acronis to a new SSD on a different computer - nice to know everything actually made it intact.

Try running the executable you clicked on directly in the terminal (in your package is should be located at res/Asa/Asa).  The current package has a bug where there is an extra folder so instead of res/Asa being the binary it is a folder so following the script isn't correct.
So from the directory containing AsaLaunch.sh, sudo res/Asa/Asa collect should work.
My understanding of how CCC works it will be identical if you boot off of it.  However, I think ASA isn't the right tool to solve your problem here.  Try using rsync: rsync -avnc $SOURCE $TARGET https://unix.stackexchange.com/questions/57305/rsync-compare-directories
On Windows you can accomplish the same thing using rsync (perhaps through cygwin) or using Robocopy.  https://improvingsoftware.com/2013/09/09/how-to-diff-two-folders-from-a-windows-command-prompt/
We don't have any plans to add this to ASA.

Thanks for your help and the great work on this tool!!!