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

How to specify a separate header file inside apoc.load.csv?

I'm migrating data from RDBMS to Neo4j. I'm using 'neo4j-admin import' tool for bulk import by loading a csv dump. In order to accomodate live updates, I'm again getting the csv dump from RDBMS. Now, I'm using 'apoc.load.csv'. I've my data in one…
napom
  • 23
  • 5
2
votes
1 answer

How to update existing specific node in graphdb by loading updated CSV file in neo4J apoc

I am facing problem updating node by loading recently updated csv file in. neo4j. since it is a large file I think apoc procedure is need to be used. I have updated existing node by loading external updated file without apoc. but problem is I…
Kalyan
  • 1,880
  • 11
  • 35
  • 62
2
votes
2 answers

Getting NEO4j Error "Expected Long(0) to be a org.neo4j.values.storable.TextValue, but it was a org.neo4j.values.storable.LongValue": 1

I am new to neo4j database. I am trying to update specific nodes from existing nodes in graph db by loading csv file . my updated value csv file look like…
Kalyan
  • 1,880
  • 11
  • 35
  • 62
2
votes
1 answer

Neo4J APOC A* and Dijkstra Conditions

I'm currently using built-in dijkstra for Neo4J path finding using conditions (see-below). CYPHER PROFILE MATCH path = shortestpath((s:Node {UID: 73946372})-[Road*]->(e:Node {UID: 2383529534})) WHERE ALL(x in relationships(path) WHERE x.LG_6 > 0 ||…
Liam
  • 439
  • 1
  • 4
  • 26
2
votes
0 answers

Is there a way to remove _id _type from cypher result

I'm converting the result of my query to a tree using the apoc.convert.toTree() procedure and then I filter the result to get only couple properties. However, in the resulting payload I get two properties _id and _type that I'm unable to…
kyserslick
  • 591
  • 1
  • 10
  • 27
2
votes
0 answers

neo4j query for chaining, 'knitting' pattern

I want to write a neo4j query, that finds a 'knitting' pattern. With that I basically mean a set of four nodes with three special edges between them. And continuing these four, there can be a next set of four nodes, that are connected by three other…
Prodiction
  • 187
  • 12
2
votes
1 answer

How to duplicate node tree in neo4j?

How can I create full node tree from existing node tree, Actually i have 1 node and i need to find all relation and nodes that has my existing top node. I need to create full node tree to another node. Copy All Node Tree from A with Relation and…
user3714269
  • 129
  • 1
  • 2
  • 4
2
votes
1 answer

How to pass parameters to APOC query in Neo4j

I'm trying to query records (between certain period) from SQL DB using APOC library. When I pass the from & to dates as parameters I'm getting an error. Code: String queryString ="CALL apoc.load.jdbc('mssql',\"select * from table as tb where…
2
votes
1 answer

"Fatal error occurred during protocol handshaking: Connection reset by peer" in Neo4j

Running a Cypher batch statement (CALL apoc.periodic.iterate() in a @Query annotation of a Neo4jRepository), I encountered repeatedly the following error situation after a couple of hours of computation. Neo4j 3.4.9, Enterprise Edition. Neo4j…
ThirstForKnowledge
  • 1,245
  • 1
  • 10
  • 27
2
votes
0 answers

How to use "apoc.map.fromPairs" in Neo4j and APOC v3.4.0.1?

I am new to neo4j and I am trying to play with it by trying to load an XML file into a map. I tried the following example posted in APOC User Guide: call…
2
votes
2 answers

Streaming data from Neo4j to Gephi - "Invalid UTF-8 start byte 0xfc"

I have recently started working with Neo4j and I am interested in visualizing my graph in Gephi. To do that, I am trying to use the apoc procedure CALL apoc.gephi.add(null,'workspace1', paths) yield nodes, relationships, time RETURN nodes,…
Isabel
  • 33
  • 7
2
votes
1 answer

MERGE instead of CREATE for apoc.create.relationship()

The procedure apoc.create.relationship(n1,RelType,{},n2) behaves accordingly to the CREATE statement. If a relationship of type RelType already exists between nodes n1 and n2 apoc.create.relationship() will create a duplicate. Is there an…
2
votes
1 answer

OutOfMemoryError: Java heap space in Neo4j

I am trying to retrieve all the fields from the joined tables. The size of the result is supposed to be 5893886 records. Every time I try to run this query using Neo4j driver for Scala, I get this kind of error: Exception in thread…
Cassie
  • 2,941
  • 8
  • 44
  • 92
2
votes
1 answer

Neo4j: Create paths/subgraph from APOC virtual relationships for streaming to Gephi

I have a Neo4j database comprising Film and Person nodes connected by ACTED_IN relationships. Using APOC, I've managed to create a set of virtual ACTED_WITH relationships directly between Person nodes reflecting the fact that they're indirectly…
rjww
  • 23
  • 3
2
votes
1 answer

How to invert relationships using APOC

I am using call apoc.refactor.invert(rel) to invert relationship directions. When I try this on already created graph with relationship type instead of rel it gives error Type mismatch: expected Relationship but was String/float and when I try to…
Raza Ul Haq
  • 342
  • 3
  • 15