getting UnsupportedOperationException: An error occurred (UnsupportedOperationException) when calling the ExecuteOpenCypherQuery operation: CALL clause is not supported in this release.

0

im trying to run this query using boto3

nep.execute_open_cypher_query( openCypherQuery="""MATCH ( n {~id: '0'} ) CALL neptune.algo.vectors.get(n) YIELD embedding AS vector CALL neptune.algo.vectors.topKByEmbedding( vector, { topK: 3 }) YIELD node, score RETURN node, score""" )

after running this query im getting UnsupportedOperationException: An error occurred (UnsupportedOperationException) when calling the ExecuteOpenCypherQuery operation: CALL clause is not supported in this release.

lalit
gefragt vor 2 Monaten184 Aufrufe
1 Antwort
0
Akzeptierte Antwort

The algorithms available via the CALL clause are accessible only when using Neptune Analytics. These algorithms are not available on Neptune Database.

Neptune Database uses the concept of clusters and instances and is designed for OLTP graph workloads. https://docs.aws.amazon.com/neptune/latest/userguide/neptune-setup.html

Neptune Analytics uses the concept of a "graph" (that abstracts the backend hardware used by the service) and is designed to be used for more OLAP and ephemeral graph analytics workloads. https://docs.aws.amazon.com/neptune-analytics/latest/userguide/create-graph-using-console.html

profile pictureAWS
beantwortet vor 2 Monaten
  • how to connect to a graph using python ne4j library.

  • Socket-based connections, such as Bolt, are not supported with Neptune Analytics graphs. You'll need to use the NeptuneGraph APIs within the AWS SDK for Python (boto3): https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/neptune-graph/client/execute_query.html

  • can you give me some reference how to add vector embedding to one node.

  • response = client.execute_query( graphIdentifier='g-4c9vlm5rg5', queryString=f""" MATCH (user:User {{user_id: 'string'}}) MERGE (chunk:Chunk {{text: "{text}", , embeddings: {list(embeddings)}}}) MERGE (user)-[:Has_chunk]->(chunk) """, language='OPEN_CYPHER',

    )

    error:

    ValidationException: An error occurred (ValidationException) when calling the ExecuteQuery operation: Expected a simple literal but found CType.

  • You need to use the CALL clause:

    MATCH (n) 
    WHERE n.code in ['SEA', 'ANC']
    CALL neptune.algo.vectors.upsert(n)
    YIELD node, embedding
    RETURN n.code, embedding
    

    Where n is the embedding you want to add. Only one embedding per node is currently supported.

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen