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
4
votes
1 answer

Neo4J / APOC - Cannot build query after calling stored procedure `apoc.cypher.doIt`

I am running the following Cypher query: WITH "CREATE (test:Test {id: 1})" AS cypher CALL apoc.cypher.doIt(cypher, {}) YIELD value CREATE (test2:Test2 {id: 2}) Afterwards, I run MATCH (a) RETURN a and see that only one node, with Test label is…
3
votes
2 answers

How do I edit neo4j.conf in an AuraDB instance?

I am trying to edit the settings of my AuraDB hosted neo4j instance, specifically, trying to set the following line: apoc.import.file.enabled=true I have looked at the official tutorial and many other places, and for the life of me, I am not able…
Bertil Johannes Ipsen
  • 1,656
  • 1
  • 14
  • 27
3
votes
2 answers

Using Unwind and Dumping Data in neo4j - Query Optimization

I am doing batch insertion to insert data in neo4j but my transaction is taking huge time as my database is increasing continuously also. In my project, For only one case ,I am having more then 18,000 records which are meant to be stored in db and…
3
votes
1 answer

Why use apoc instead of cypher for simple queries?

I have written (and optimized, using "PROFILE") a Cypher query that answers neighbors of a node given the node. Now I find an apoc procedure (apoc.neighbors.athop) that seems to do the same thing. Is the APOC version better? Faster? More robust? I…
Tom Stambaugh
  • 1,019
  • 13
  • 18
3
votes
0 answers

Implementing Dijkstra's algorithm in Neo4j with max hops

I have simple weighted graph. I know how to find shortest route (in terms of hops) and I know how to find shortest route by weight. I need to find shortest route by weight, but I also need to limit how many hops are allowed. Is it possible with…
3
votes
2 answers

Failed to invoke procedure `apoc.load.csv`: Caused by: java.io.IOException: Cannot open file test.csv for reading

I am using Neo4j 3.4.7 and this is simple query i tried to run: CALL apoc.load.csv('test.csv') yield lineNo, map , list RETURN *; after getting error I set following apoc related rules in conf file: apoc.import.file.enabled=true …
shafigh
  • 61
  • 1
  • 2
  • 10
3
votes
1 answer

Unable to call apoc.load.json on Neo4j 3.2.6

I am using Neo4j Community Edition 3.2.6 along with apoc-3.2.3.5-all.jar on Mac. When I try to use any query on the browser that contains call apoc.load.json, I keep getting Failed to invoke procedure apoc.load.json: Caused by:…
media
  • 433
  • 5
  • 19
3
votes
1 answer

Neo4j APOC Error: Failed to invoke procedure (Access is denied)

CALL apoc.export.csv.query(" match (m:Movie) where m.name='Matrix' return m.name", "results.csv",{}) Error: Neo.ClientError.Procedure.ProcedureCallFailed Failed to invoke procedure apoc.export.csv.query: Caused by: …
Faaiz
  • 635
  • 8
  • 18
3
votes
2 answers

Neo4j APOC Export CSV to specific Directory

Following query works fine for me CALL apoc.export.csv.query("MATCH (a:Person) RETURN a.name AS name", "result.csv", {}) but i want to export the result to a specific directory e.g in 'test' directory /neo4j-community-3.2.6/test/result.csv Test…
Faaiz
  • 635
  • 8
  • 18
3
votes
1 answer

Cypher query to dynamically match parameter in apoc call

I am using a query of the following structure MATCH path=((:Start)-[:NEXT*..100]->(n)) WHERE ALL(mnode IN nodes(path) WHERE mnode.minimum <= $data[mnode.checkagainst]) where data is something like {checkparam1: 24}. What this does for me is:…
tscherg
  • 1,032
  • 8
  • 22
3
votes
2 answers

How to use apoc.load.csv in conjunction with apoc.create.node

I need to import a CSV file and create a node from each record. I am using APOC because supposedly I can use a column in the CSV file to define each node type as the nodes are created. This doesn't work: CALL…
nicomp
  • 4,344
  • 4
  • 27
  • 60
3
votes
1 answer

apoc.convert.fromJsonMap() does not correctly handle escaped characters in strings

Versions: Neo4j 3.2.2 Community; APOC 3.2.0.3 Escaped characters in strings are not handled correctly in all instances. This works as expected: WITH apoc.convert.fromJsonMap( '{"a":42,"b":"foo\\bar","c":[1,2,3]}') AS p RETURN…
jimwilli
  • 31
  • 2
3
votes
1 answer

How to export to .csv with Neo4j APOC including relationship ID

Recently I have been using Neo4j for a project for a course I'm following. I've figured out how to use APOC to export my database to .csv. However, the exported .csv file does not include the relationship ID. I use the following call to export the…
3
votes
2 answers

Export Data to csv files from Neo4j pragmatically

I need your advice on neo4j export things…. I used ” apoc.export.cypher.query” to export my nodes and relationships to csv files , however the exported contents are cypher statements. This is a sample exported csv file : begin CREATE…
Lina
  • 1,217
  • 1
  • 15
  • 28
2
votes
1 answer

apoc.uuid.install not registered for this database instance

I've installed the apoc plugin using neo4j desktop, according to those instructions: https://neo4j.com/labs/apoc/4.1/installation/#:~:text=APOC%20Full%20can%20be%20installed,see%20the%20%22Installed%22%20message. I've created a new apoc.conf file in…
Itamarled
  • 145
  • 11
1
2
3
45 46