This repository was archived by the owner on Sep 18, 2023. It is now read-only.
Open
Conversation
vpavicic
reviewed
Sep 8, 2023
vpavicic
reviewed
Sep 8, 2023
vpavicic
reviewed
Sep 8, 2023
| ```cypher | ||
| CALL export_util.graphml(path); | ||
| ``` | ||
| where `path` is the path to the JSON file inside the |
vpavicic
reviewed
Sep 8, 2023
| ```cypher | ||
| CALL export_util.graphml(path); | ||
| ``` | ||
| where `path` is the path to a local JSON file that will be created inside the |
Collaborator
There was a problem hiding this comment.
Suggested change
| 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?
vpavicic
reviewed
Sep 8, 2023
Comment on lines
+386
to
+387
| CREATE (JoyceByers:Character {name:'Joyce Byers', portrayed_by:'Winona Ryder'}) | ||
| CREATE (JimHopper:Character {name:'Jim Hopper', portrayed_by:'David Harbour'}) |
Collaborator
There was a problem hiding this comment.
I noticed this once and I was like... will i fix this... is this worth opening a PR for :D :D naaaah... :D thnx
vpavicic
reviewed
Sep 8, 2023
vpavicic
reviewed
Sep 8, 2023
|
|
||
| | Name | Type | Default | Description | | ||
| |- |- |- |- | | ||
| | readLabels | Bool | False | Create node labels based on the value of the property whose key is "labels". | |
Collaborator
There was a problem hiding this comment.
Suggested change
| | 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"?
vpavicic
reviewed
Sep 8, 2023
vpavicic
reviewed
Sep 8, 2023
| | 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"})`. | |
Collaborator
There was a problem hiding this comment.
Suggested change
| | 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?
vpavicic
reviewed
Sep 8, 2023
| | 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"})`. | |
Collaborator
There was a problem hiding this comment.
Suggested change
| | 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"})`. | |
vpavicic
reviewed
Sep 8, 2023
|
|
||
| #### Output: | ||
|
|
||
| * `status: string` ➡ "success" if no errors are generated. |
Collaborator
There was a problem hiding this comment.
Suggested change
| * `status: string` ➡ "success" if no errors are generated. | |
| * `status: string` ➡ `success` if no errors are generated. |
Collaborator
There was a problem hiding this comment.
why is there an asterisk at the beginning of this row'?
vpavicic
reviewed
Sep 8, 2023
| ```cypher | ||
| CALL export_util.graphML(path); | ||
| ``` | ||
| where `path` is the path to the JSON file inside the |
vpavicic
reviewed
Sep 8, 2023
| ```cypher | ||
| CALL export_util.graphml(path); | ||
| ``` | ||
| where `path` is the path to a local JSON file that will be created inside the |
…aph/docs into T350-MAGE-add-graphml-docs
vpavicic
approved these changes
Sep 11, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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: