Skip to content

Commit 0ca3ba3

Browse files
Merge pull request #5399 from soerenreichardt/multi-rel-prop-export-docs
Add documentation for multi rel property export
2 parents df52d64 + 1d89952 commit 0ca3ba3

File tree

1 file changed

+48
-6
lines changed

1 file changed

+48
-6
lines changed

doc/asciidoc/management-ops/graph-catalog/graph-catalog-apache-arrow-ops.adoc

Lines changed: 48 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,8 @@ The specific configuration needs to include the following keys:
106106
| node_properties | String or List of Strings | The node properties in the graph to stream.
107107
|===
108108

109-
Note, that the schema of the result records is not identical to the corresponding procedure.
110-
Instead of separate column containing the property key, every property is returned in its own column.
109+
Note that the schema of the result records is not identical to the corresponding procedure.
110+
Instead of a separate column containing the property key, every property is returned in its own column.
111111
As a result, there is only one row per node which includes all its property values.
112112

113113
For example, given the node `(a { foo: 42, bar: 1337, baz: [1,3,3,7] })` and assuming node id `0` for `a`, the resulting record schema is as follows:
@@ -151,8 +151,50 @@ The schema of the result records is identical to the corresponding procedure:
151151
.Results
152152
[opts="header",cols="2,3,5"]
153153
|===
154-
|Name | Type | Description
155-
|sourceId | Integer | The source node id of the relationship.
156-
|targetId | Integer | The target node id of the relationship.
157-
|propertyValue | Float | The stored property value.
154+
|Name | Type | Description
155+
|sourceId | Integer | The source node id of the relationship.
156+
|targetId | Integer | The target node id of the relationship.
157+
|relationshipType | String | The type of the relationship.
158+
|propertyValue | Float | The stored property value.
159+
|===
160+
161+
162+
== Stream multiple relationship properties
163+
164+
To stream multiple relationship properties, the client needs to encode that information in the ticket as follows:
165+
166+
----
167+
{
168+
graph_name: "my_graph",
169+
database_name: "database_name",
170+
procedure_name: "gds.graph.streamRelationshipProperties",
171+
configuration: {
172+
relationship_types: "REL",
173+
relationship_property: ["foo", "bar"]
174+
}
175+
}
176+
----
177+
178+
The `procedure_name` indicates that we mirror the behaviour of the existing <<catalog-graph-stream-relationship-properties-example, procedure>>.
179+
The specific configuration needs to include the following keys:
180+
181+
[[arrow-relationship-properties-export]]
182+
[opts=header,cols="1m,1,1"]
183+
|===
184+
| Name | Type | Description
185+
| relationship_types | String or List of Strings | Stream only properties for relationships with the given type.
186+
| relationship_properties | String or List of String | The relationship properties in the graph to stream.
187+
|===
188+
189+
Note that the schema of the result records is not identical to the corresponding procedure.
190+
Instead of a separate column containing the property key, every property is returned in its own column.
191+
As a result, there is only one row per relationship which includes all its property values.
192+
193+
For example, given the relationship `[:REL { foo: 42.0, bar: 13.37 }]` that connects a source node with id `0` wit a target node with id `1`, the resulting record schema is as follows:
194+
195+
.Results
196+
[opts="header",cols="2,3,5"]
197+
|===
198+
| sourceId | targetId | relationshipType | foo | bar
199+
| 0 | 1 | REL | 42.0 | 13.37
158200
|===

0 commit comments

Comments
 (0)