|
33 | 33 | "YIELD label, other, elementType, type, property "
|
34 | 34 | "WHERE NOT type = 'RELATIONSHIP' AND elementType = 'node' "
|
35 | 35 | "AND NOT label IN $EXCLUDED_LABELS "
|
36 |
| - "WITH label AS nodeLabels, collect({property:property, type:type}) AS properties " |
37 |
| - "RETURN {labels: nodeLabels, properties: properties} AS output" |
| 36 | + "WITH label AS nodeLabel, collect({property:property, type:type}) AS properties " |
| 37 | + "RETURN {label: nodeLabel, properties: properties} AS output" |
38 | 38 | )
|
39 | 39 |
|
40 | 40 | REL_PROPERTIES_QUERY = (
|
41 | 41 | "CALL apoc.meta.data() "
|
42 | 42 | "YIELD label, other, elementType, type, property "
|
43 | 43 | "WHERE NOT type = 'RELATIONSHIP' AND elementType = 'relationship' "
|
44 | 44 | "AND NOT label in $EXCLUDED_LABELS "
|
45 |
| - "WITH label AS nodeLabels, collect({property:property, type:type}) AS properties " |
46 |
| - "RETURN {type: nodeLabels, properties: properties} AS output" |
| 45 | + "WITH label AS relType, collect({property:property, type:type}) AS properties " |
| 46 | + "RETURN {type: relType, properties: properties} AS output" |
47 | 47 | )
|
48 | 48 |
|
49 | 49 | REL_QUERY = (
|
@@ -293,7 +293,7 @@ def get_structured_schema(
|
293 | 293 | index = []
|
294 | 294 |
|
295 | 295 | structured_schema = {
|
296 |
| - "node_props": {el["labels"]: el["properties"] for el in node_properties}, |
| 296 | + "node_props": {el["label"]: el["properties"] for el in node_properties}, |
297 | 297 | "rel_props": {el["type"]: el["properties"] for el in rel_properties},
|
298 | 298 | "relationships": relationships,
|
299 | 299 | "metadata": {"constraint": constraint, "index": index},
|
|
0 commit comments