Skip to content

Commit

Permalink
Update exportCypher.adoc (#576)
Browse files Browse the repository at this point in the history
  • Loading branch information
webtic authored and jexp committed Aug 30, 2017
1 parent 88cd3a1 commit 0c48b17
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions docs/exportCypher.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,22 @@ To change the export format, you have to set it on the config params like `{form
By default the format is `neo4j-shell`.

It is possible to choose between four cypher export formats:
To change the cypher export format, you have to set it on the config params like `{cypherFormat: "updateAll"}`

* "create": all CREATE
* "updateAll": MERGE instead of CREATE
* "addStructure": MATCH for nodes + MERGE for rels
* "updateStructure": MERGE + MATCH for nodes and rels
* `create`: all CREATE
* `updateAll`: MERGE instead of CREATE
* `addStructure`: MATCH for nodes + MERGE for rels
* `updateStructure`: MERGE + MATCH for nodes and rels
Format and cypherFormat can be used both in the same query giving you complete control over the exact export format:

[source,cypher]
----
call apoc.export.cypher.query(
"MATCH (p1:Person)-[r:KNOWS]->(p2:Person) RETURN p1,r,p2",
"/tmp/friendships.cypher",
{format:'plain',cypherFormat:'updateStructure'})`
----

// tag::export.cypher[]
`YIELD file, source, format, nodes, relationships, properties, time`
Expand Down

0 comments on commit 0c48b17

Please sign in to comment.