-
Notifications
You must be signed in to change notification settings - Fork 22
[master < T350] Add graphml docs #1020
base: master
Are you sure you want to change the base?
Conversation
```cypher | ||
CALL export_util.graphml(path); | ||
``` | ||
where `path` is the path to the JSON file inside the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
JSON or graphml?
```cypher | ||
CALL export_util.graphml(path); | ||
``` | ||
where `path` is the path to a local JSON file that will be created inside the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
where `path` is the path to a local JSON file that will be created inside the | |
where `path` is the path to a local JSON file that will be created inside the |
again, json?
CREATE (JoyceByers:Character {name:'Joyce Byers', portrayed_by:'Winona Ryder'}) | ||
CREATE (JimHopper:Character {name:'Jim Hopper', portrayed_by:'David Harbour'}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I noticed this once and I was like... will i fix this... is this worth opening a PR for :D :D naaaah... :D thnx
|
||
| Name | Type | Default | Description | | ||
|- |- |- |- | | ||
| readLabels | Bool | False | Create node labels based on the value of the property whose key is "labels". | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| readLabels | Bool | False | Create node labels based on the value of the property whose key is "labels". | | |
| readLabels | Bool | False | Create node labels by using the value of the `labels` key. | |
- nodes ain't people
- the original sentence is very complicated... is mine ok? why do we need to say "property"?
| readLabels | Bool | False | Create node labels based on the value of the property whose key is "labels". | | ||
| defaultRelationshipType | String | "RELATED" | The default relationship type to use when none is specified in the import file. | | ||
| storeNodeIds | Bool | False | Store node's id attribute as a property. | | ||
| source | Map | { } | A map that has two keys: label and id. Label is mandatory while id's default value is "id". This allows the import of relationships in case the source node is not present in the file. It will search for a source node with a specific label and a property whose key is this map's id value, and whose value is relationship's source node id. For example, with a config map `{source: {id: 'serial_number', label: 'Device'}}` and an edge defined as `<edge id="e0" source="n0" target="n1" label="CONNECT"><data key="label">CONNECT</data></edge>`, if node "n0" doesn't exist, it will search for a source node `(:Device {serial_number: "n0"})`. | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| source | Map | { } | A map that has two keys: label and id. Label is mandatory while id's default value is "id". This allows the import of relationships in case the source node is not present in the file. It will search for a source node with a specific label and a property whose key is this map's id value, and whose value is relationship's source node id. For example, with a config map `{source: {id: 'serial_number', label: 'Device'}}` and an edge defined as `<edge id="e0" source="n0" target="n1" label="CONNECT"><data key="label">CONNECT</data></edge>`, if node "n0" doesn't exist, it will search for a source node `(:Device {serial_number: "n0"})`. | | |
| source | Map | { } | A map with two keys: `label` and `id`. The `label` is mandatory, while the `id`'s default value is `id`. This allows the import of relationships if the source node is absent in the file. It will search for a source node with a specific label and a property equal to the map's `id` value. The value of that property should be equal to the relationship's source node ID. For example, with a config map `{source: {id: 'serial_number', label: 'Device'}}` and an edge defined as `<edge id="e0" source="n0" target="n1" label="CONNECT"><data key="label">CONNECT</data></edge>`, if node "n0" doesn't exist, it will search for a source node `(:Device {serial_number: "n0"})`. | |
What will allow the import of relationships if the source node is absent?
What will search for a source node?
The explanation was really complicated, is what I wrote true?
| defaultRelationshipType | String | "RELATED" | The default relationship type to use when none is specified in the import file. | | ||
| storeNodeIds | Bool | False | Store node's id attribute as a property. | | ||
| source | Map | { } | A map that has two keys: label and id. Label is mandatory while id's default value is "id". This allows the import of relationships in case the source node is not present in the file. It will search for a source node with a specific label and a property whose key is this map's id value, and whose value is relationship's source node id. For example, with a config map `{source: {id: 'serial_number', label: 'Device'}}` and an edge defined as `<edge id="e0" source="n0" target="n1" label="CONNECT"><data key="label">CONNECT</data></edge>`, if node "n0" doesn't exist, it will search for a source node `(:Device {serial_number: "n0"})`. | | ||
| target | Map | { } | A map that has two keys: label and id. Label is mandatory while id's default value is "id". This allows the import of relationships in case the target node is not present in the file. It will search for a target node with a specific label and a property whose key is this map's id value, and whose value is relationship's target node id. For example, with a config map `{target: {id: 'serial_number', label: 'Device'}}` and an edge defined as `<edge id="e0" source="n0" target="n1" label="CONNECT"><data key="label">CONNECT</data></edge>`, if node "n1" doesn't exist, it will search for a target node `(:Device {serial_number: "n1"})`. | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| target | Map | { } | A map that has two keys: label and id. Label is mandatory while id's default value is "id". This allows the import of relationships in case the target node is not present in the file. It will search for a target node with a specific label and a property whose key is this map's id value, and whose value is relationship's target node id. For example, with a config map `{target: {id: 'serial_number', label: 'Device'}}` and an edge defined as `<edge id="e0" source="n0" target="n1" label="CONNECT"><data key="label">CONNECT</data></edge>`, if node "n1" doesn't exist, it will search for a target node `(:Device {serial_number: "n1"})`. | | |
| target | Map | { } | A map with two keys: `label` and `id`. The `label` is mandatory while the `id`'s default value is `id`. This allows the import of relationships in case the target node is absent in the file. It will search for a target node with a specific label and a property equal to the map's `id` value. The value of that property should be equal to the relationship's target node ID. For example, with a config map `{target: {id: 'serial_number', label: 'Device'}}` and an edge defined as `<edge id="e0" source="n0" target="n1" label="CONNECT"><data key="label">CONNECT</data></edge>`, if node "n1" doesn't exist, it will search for a target node `(:Device {serial_number: "n1"})`. | |
|
||
#### Output: | ||
|
||
* `status: string` ➡ "success" if no errors are generated. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* `status: string` ➡ "success" if no errors are generated. | |
* `status: string` ➡ `success` if no errors are generated. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is there an asterisk at the beginning of this row'?
```cypher | ||
CALL export_util.graphML(path); | ||
``` | ||
where `path` is the path to the JSON file inside the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
JSON or graphml?
```cypher | ||
CALL export_util.graphml(path); | ||
``` | ||
where `path` is the path to a local JSON file that will be created inside the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
JSON or graphml?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See comments
…aph/docs into T350-MAGE-add-graphml-docs
Description
Added documentation for graphml import and export functions.
Pull request type
Related PRs and issues
PR this doc page is related to: memgraph/mage#327
Checklist: