Questions tagged [neo4j-apoc]

APOC is short for "Awesome Procedures on Cypher." Introduced in Neo4j release 3.0, APOCs are callable procedures which extend the Cypher query language.Questions with the neo4j-apoc tag should be for "small, generic helper functions for common tasks" that are not available in the Cypher query language.

APOC procedures are "User Defined Procedures." They are similar to stored procedures in some relational databases. APOCs can be written in any language that runs on the JVM. Questions tagged with neo4j-apoc should have an accompanying tag for the specific language being used.

Built in procedures are included in Neo4j releases. Before posting a question on StackOverflow, please consult the Neo4j documentation and ask if your task is possible in the public chat channels.

685 questions
2
votes
1 answer

Neo4j Conditional query

In Neo4j graph I have 2 nodes with same label and 4 properties, I want the condition to check value of there properties are equal, and if any of 4 properties are equal I want to create relation between those 2 nodes as Similar_To , this relation…
2
votes
1 answer

How do I run LOAD CSV using spring-boot-starter-data-neo4j?

I'm trying to run LOAD CSV to load a file into neo4j using spring-boot-starter-data-neo4j 2.7.4. Since spring data neo4j gives me access to neo4j through the Neo4jRepository interface I can only submit queries and not call LOAD CSV. Is it possible…
2
votes
1 answer

Neo4j query for taking max of a column based on group by of another column

I want to convert the below SQL query to Neo4j query: select max(col1) from screens GROUP BY col2 I want to get a group of similar col2 and then extract max col2 from it. I am unable to find group by in neo4j, some of the posts are using Count(*)…
2
votes
1 answer

Neo4j APOC import csv NoSuchElementException error

I created 2 test files following neo4j's documentation for an apoc csv import (configuration file has: apoc.import.file.enabled=true, apoc.export.file.enabled=true, dbms.directories.plugins=plugins , dbms.directories.import=import), the apoc plug in…
E2023
  • 105
  • 12
2
votes
1 answer

Load array data to neo4j from snowflake

I have been trying to load array column data to neo4j from snowflake but it is loaded as a string instead of an array. I am using apoc.load.jdbc command to connect snowflake and trying to retrieve array column. WITH…
VarYaz
  • 119
  • 2
  • 12
2
votes
1 answer

Apoc procedure - Trigger ID and increment

which is the correct APoc procedure to Trigger an ID and Increment it +1 every time I call a create? Assuming User has an ID - my idea is to increment using ID and not UUID. CALL apoc.trigger.add('create-event-gen-id',"UNWIND {createdNodes} AS…
2
votes
1 answer

For the given multiple nodes find a node

Without reading all the given User nodes, is there a way to find it by using the given Exam nodes? Example: For the given Exam nodes mtech and mca, how would I find the User node?
Karan Dhir
  • 731
  • 1
  • 6
  • 24
2
votes
1 answer

Neo4j poor order by query performance

I have a complex cypher, When I don't use "order by" I get a pretty fast response but when I use "order by" it is incredibly slow. I have an b tree index on my order attribute(score of the movie which is PageRank algorithm score). I added the…
Mehmet Sezer
  • 103
  • 4
2
votes
0 answers

Query Optimization for Parallel Connection in Neo4j Community Version

I am evaluating the Neo4j Community version with data that have millions of nodes and relationships. I wrote a thread application to write data in parallel. Four threads are working parallelly and the total write time got reduced by 4 times but the…
Rheatey Bash
  • 779
  • 6
  • 17
2
votes
0 answers

APOC UUID support in Kubernetes

I'm running a Neo4j instance (version 4.2.2) in a pod within a Kubernetes cluster, in standalone mode. The server starts, I can create, find and update nodes and relationships, however, when trying to install a UUID using apoc.uuid.install, the…
ams
  • 21
  • 1
2
votes
1 answer

Can't get APOC to work on Neo4j Community Edition google cloud instance

I created a Neo4j Community Edition instance on google cloud from the marketplace and when I tested it from my local application I got the following error: Error: Unknown function 'apoc.cypher.runFirstColumn' (...) I did some digging and found out…
2
votes
1 answer

How to avoid duplicate while creating node using apoc.periodic.iterate for csv load neo4j?

I have to create node from CSV file. As the file is too large I am using apoc.periodic.iterate function to read file. CSV is having duplicate entries, and due to parallel processing duplicate nodes are created. How can I make sure that the duplicate…
Piyush Srivastava
  • 357
  • 1
  • 4
  • 21
2
votes
1 answer

Delete using Periodic Iterate not working

I'm using this query to delete a lot of nodes, and it works fine in 4.0.0 but using 4.1.1 it doesn't seem to work CALL apoc.periodic.iterate(' MATCH (s:Thing{id:$thingId}) CALL apoc.path.subgraphNodes(s, {}) YIELD node RETURN node', 'DETACH…
Richard
  • 1,731
  • 2
  • 23
  • 54
2
votes
1 answer

Failed to invoke procedure `apoc.cypher.mapParallel2`: Caused by: java.lang.RuntimeException: Error polling, timeout of 10 seconds reached

I am trying to count the number of relationships (c:Cell)-[:EXPRSSED_IN]->(g:Gene) by using the query: CYPHER runtime=pipelined MATCH (c:Cell)-[r:EXPRESSED_IN]->(g:Gene) WHERE c.id >= 0 AND c.id < 6000 RETURN count(*) AS count; The query executed…
AnhHao Trần
  • 145
  • 1
  • 10
2
votes
0 answers

Procedures in apoc.mongodb deprecated

I'm trying to connect Mongodb with Neo4j via APOC. I get a warning of deprecation: This feature is deprecated and will be removed in future versions. The query used a deprecated procedure. ('apoc.mongodb.get' is no longer supported) EXPLAIN CALL…
1 2
3
45 46