apoc.meta.data
Procedure APOC Core
apoc.meta.data({config}) - examines a subset of the graph to provide a tabular meta information
Signature
apoc.meta.data(config = {} :: MAP?) :: (label :: STRING?, property :: STRING?, count :: INTEGER?, unique :: BOOLEAN?, index :: BOOLEAN?, existence :: BOOLEAN?, type :: STRING?, array :: BOOLEAN?, sample :: LIST? OF ANY?, leftCount :: INTEGER?, rightCount :: INTEGER?, left :: INTEGER?, right :: INTEGER?, other :: LIST? OF STRING?, otherLabels :: LIST? OF STRING?, elementType :: STRING?)
Config parameters
The procedure support the following config parameters:
name | type | default | description |
---|---|---|---|
includeLabels |
List<String> |
[] |
labels to include. Default is to include all labels |
includeRels |
List<String> |
[] |
relationship types to include. Default is to include all relationship types |
excludesLabels |
List<String> |
[] |
labels to include. Default is to include all relationship types |
sample |
Long |
1000 |
number of nodes to sample per label |
maxRels |
Long |
100 |
number of relationships to sample per relationship type |
name | type | default | description |
---|---|---|---|
labels |
List<String> |
[] |
deprecated, use |
rels |
List<String> |
[] |
deprecated, use |
excludes |
List<String> |
[] |
deprecated, use |
Output parameters
Name | Type |
---|---|
label |
STRING? |
property |
STRING? |
count |
INTEGER? |
unique |
BOOLEAN? |
index |
BOOLEAN? |
existence |
BOOLEAN? |
type |
STRING? |
array |
BOOLEAN? |
sample |
LIST? OF ANY? |
leftCount |
INTEGER? |
rightCount |
INTEGER? |
left |
INTEGER? |
right |
INTEGER? |
other |
LIST? OF STRING? |
otherLabels |
LIST? OF STRING? |
elementType |
STRING? |
Usage Examples
The examples in this section are based on the following sample graph:
CREATE (Keanu:Person {name:'Keanu Reeves', born:1964})
CREATE (TomH:Person {name:'Tom Hanks', born:1956})
CREATE (TheMatrix:Movie {title:'The Matrix', released:1999, tagline:'Welcome to the Real World'})
CREATE (TheMatrixReloaded:Movie {title:'The Matrix Reloaded', released:2003, tagline:'Free your mind'})
CREATE (TheMatrixRevolutions:Movie {title:'The Matrix Revolutions', released:2003, tagline:'Everything that has a beginning has an end'})
CREATE (SomethingsGottaGive:Movie {title:"Something's Gotta Give", released:2003})
CREATE (TheDevilsAdvocate:Movie {title:"The Devil's Advocate", released:1997, tagline:'Evil has its winning ways'})
CREATE (YouveGotMail:Movie {title:"You've Got Mail", released:1998, tagline:'At odds in life... in love on-line.'})
CREATE (SleeplessInSeattle:Movie {title:'Sleepless in Seattle', released:1993, tagline:'What if someone you never met, someone you never saw, someone you never knew was the only someone for you?'})
CREATE (ThatThingYouDo:Movie {title:'That Thing You Do', released:1996, tagline:'In every life there comes a time when that thing you dream becomes that thing you do'})
CREATE (CloudAtlas:Movie {title:'Cloud Atlas', released:2012, tagline:'Everything is connected'})
CREATE (Keanu)-[:ACTED_IN {roles:['Neo']}]->(TheMatrix)
CREATE (Keanu)-[:ACTED_IN {roles:['Neo']}]->(TheMatrixReloaded)
CREATE (Keanu)-[:ACTED_IN {roles:['Neo']}]->(TheMatrixRevolutions)
CREATE (Keanu)-[:ACTED_IN {roles:['Julian Mercer']}]->(SomethingsGottaGive)
CREATE (Keanu)-[:ACTED_IN {roles:['Kevin Lomax']}]->(TheDevilsAdvocate)
CREATE (TomH)-[:ACTED_IN {roles:['Joe Fox']}]->(YouveGotMail)
CREATE (TomH)-[:ACTED_IN {roles:['Sam Baldwin']}]->(SleeplessInSeattle)
CREATE (TomH)-[:ACTED_IN {roles:['Mr. White']}]->(ThatThingYouDo)
CREATE (TomH)-[:ACTED_IN {roles:['Zachry', 'Dr. Henry Goose', 'Isaac Sachs', 'Dermot Hoggins']}]->(CloudAtlas);
CALL apoc.meta.data();
label | property | count | unique | index | existence | type | array | sample | leftCount | rightCount | left | right | other | otherLabels | elementType |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
"ACTED_IN" |
"Person" |
9 |
FALSE |
FALSE |
FALSE |
"RELATIONSHIP" |
TRUE |
NULL |
41 |
9 |
4 |
1 |
["Movie"] |
[] |
"relationship" |
"ACTED_IN" |
"roles" |
0 |
FALSE |
FALSE |
FALSE |
"LIST" |
TRUE |
NULL |
0 |
0 |
0 |
0 |
[] |
[] |
"relationship" |
"Person" |
"ACTED_IN" |
9 |
FALSE |
FALSE |
FALSE |
"RELATIONSHIP" |
TRUE |
NULL |
41 |
9 |
4 |
1 |
["Movie"] |
[] |
"node" |
"Person" |
"name" |
0 |
FALSE |
FALSE |
FALSE |
"STRING" |
FALSE |
NULL |
0 |
0 |
0 |
0 |
[] |
[] |
"node" |
"Person" |
"born" |
0 |
FALSE |
FALSE |
FALSE |
"INTEGER" |
FALSE |
NULL |
0 |
0 |
0 |
0 |
[] |
[] |
"node" |
"Movie" |
"title" |
0 |
FALSE |
FALSE |
FALSE |
"STRING" |
FALSE |
NULL |
0 |
0 |
0 |
0 |
[] |
[] |
"node" |
"Movie" |
"tagline" |
0 |
FALSE |
FALSE |
FALSE |
"STRING" |
FALSE |
NULL |
0 |
0 |
0 |
0 |
[] |
[] |
"node" |
"Movie" |
"released" |
0 |
FALSE |
FALSE |
FALSE |
"INTEGER" |
FALSE |
NULL |
0 |
0 |
0 |
0 |
[] |
[] |
"node" |