apoc.refactor

Qualified Name Type Release

apoc.refactor.categorize(sourceKey, type, outgoing, label, targetKey, copiedKeys, batchSize) turn each unique propertyKey into a category node and connect to it

Procedure

APOC Core

apoc.refactor.cloneNodes([node1,node2,…​]) clone nodes with their labels and properties

Procedure

APOC Core

apoc.refactor.cloneNodesWithRelationships([node1,node2,…​]) clone nodes with their labels, properties and relationships

Procedure

APOC Core

apoc.refactor.cloneSubgraph([node1,node2,…​], [rel1,rel2,…​]:[], {standinNodes:[], skipProperties:[]}) YIELD input, output, error | clone nodes with their labels and properties (optionally skipping any properties in the skipProperties list via the config map), and clone the given relationships (will exist between cloned nodes only). If no relationships are provided, all relationships between the given nodes will be cloned. Relationships can be optionally redirected according to standinNodes node pairings (this is a list of list-pairs of nodes), so given a node in the original subgraph (first of the pair), an existing node (second of the pair) can act as a standin for it within the cloned subgraph. Cloned relationships will be redirected to the standin.

Procedure

APOC Core

apoc.refactor.cloneSubgraphFromPaths([path1, path2, …​], {standinNodes:[], skipProperties:[]}) YIELD input, output, error | from the subgraph formed from the given paths, clone nodes with their labels and properties (optionally skipping any properties in the skipProperties list via the config map), and clone the relationships (will exist between cloned nodes only). Relationships can be optionally redirected according to standinNodes node pairings (this is a list of list-pairs of nodes), so given a node in the original subgraph (first of the pair), an existing node (second of the pair) can act as a standin for it within the cloned subgraph. Cloned relationships will be redirected to the standin.

Procedure

APOC Core

apoc.refactor.collapseNode([node1,node2],'TYPE') collapse node to relationship, node with one rel becomes self-relationship

Procedure

APOC Core

apoc.refactor.deleteAndReconnect([pathLinkedList], [nodesToRemove], {config}) - Removes some nodes from a linked list

Procedure

APOC Core

apoc.refactor.extractNode([rel1,rel2,…​], [labels],'OUT','IN') extract node from relationships

Procedure

APOC Core

apoc.refactor.from(rel, startNode) redirect relationship to use new start-node

Procedure

APOC Core

apoc.refactor.invert(rel) inverts relationship direction

Procedure

APOC Core

apoc.refactor.mergeNodes([node1,node2],[{properties:'overwrite' or 'discard' or 'combine'}]) merge nodes onto first in list

Procedure

APOC Core

apoc.refactor.mergeRelationships([rel1,rel2]) merge relationships onto first in list

Procedure

APOC Core

apoc.refactor.normalizeAsBoolean(entity, propertyKey, true_values, false_values) normalize/convert a property to be boolean

Procedure

APOC Core

apoc.refactor.rename.label(oldLabel, newLabel, [nodes]) | rename a label from 'oldLabel' to 'newLabel' for all nodes. If 'nodes' is provided renaming is applied to this set only

Procedure

APOC Core

apoc.refactor.rename.nodeProperty(oldName, newName, [nodes], {config}) | rename all node’s property from 'oldName' to 'newName'. If 'nodes' is provided renaming is applied to this set only

Procedure

APOC Core

apoc.refactor.rename.type(oldType, newType, [rels], {config}) | rename all relationships with type 'oldType' to 'newType'. If 'rels' is provided renaming is applied to this set only

Procedure

APOC Core

apoc.refactor.rename.typeProperty(oldName, newName, [rels], {config}) | rename all relationship’s property from 'oldName' to 'newName'. If 'rels' is provided renaming is applied to this set only

Procedure

APOC Core

apoc.refactor.setType(rel, 'NEW-TYPE') change relationship-type

Procedure

APOC Core

apoc.refactor.to(rel, endNode) redirect relationship to use new end-node

Procedure

APOC Core