Skip to content

Commit 39c1c8e

Browse files
committed
Map write-back to session types
1 parent c4043b2 commit 39c1c8e

File tree

1 file changed

+14
-11
lines changed

1 file changed

+14
-11
lines changed

doc/modules/ROOT/pages/graph-analytics-serverless.adoc

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ There are three types of GDS Sessions:
1515
1616
The process of populating the session with data is called _remote projection_.
1717
Once populated, a GDS Session can run GDS workloads, such as algorithms and machine learning models.
18-
Results from these computations can be written back to the original source, using _remote write-back_ in the Attached and Self-managed flavours.
18+
Results from these computations can be written back to the original source, using _remote write-back_ in the Attached and Self-managed types.
1919

2020
TIP: For ready-to-run notebooks, see our tutorials on GDS Sessions for xref:tutorials/graph-analytics-serverless.adoc[AuraDB] and xref:tutorials/graph-analytics-serverless-self-managed[self-managed databases].
2121

@@ -95,9 +95,9 @@ sessions.get_or_create(
9595
| Name | Type | Optional | Default | Description
9696
| session_name | str | no | - | Name of the session. Must be unique within the project.
9797
| memory | SessionMemory | no | - | Amount of memory available to the session. https://neo4j.com/docs/graph-data-science-client/{docs-version}/api/sessions/session_memory[Supported values].
98-
| db_connection | DbmsConnectionInfo | yes | None | Bolt server URL, username, and password to a Neo4j DBMS. Required for the Attached and Self-managed flavours.
98+
| db_connection | DbmsConnectionInfo | yes | None | Bolt server URL, username, and password to a Neo4j DBMS. Required for the Attached and Self-managed types.
9999
| ttl | datetime.timedelta | yes | 1h | Time-to-live for the session.
100-
| cloud_location| CloudLocation | yes | None | Aura-supported cloud provider and region where the GDS Session will run. Required for the Self-managed and Standalone flavours.
100+
| cloud_location| CloudLocation | yes | None | Aura-supported cloud provider and region where the GDS Session will run. Required for the Self-managed and Standalone types.
101101
| timeout | int | yes | None | Seconds to wait for the session to enter Ready state. If the time is exceeded, an error will be returned.
102102
|===
103103

@@ -502,9 +502,10 @@ For a full list of the available algorithms, see the https://neo4j.com/docs/grap
502502

503503
== Remote write-back
504504

505-
The GDS Session's in-memory graph was projected from data in AuraDB, so write-back operations will persist the data back to the same AuraDB instance.
506-
When calling any write operations, the GDS Python client will automatically use the remote write-back functionality.
507-
This includes all `.write` algorithm modes as well as all `.write` graph operations.
505+
Persisting the results of a computation done in a GDS Session differs by the session's type.
506+
Attached and Self-managed sessions come with built-in support for writing back algorithms results to the same Neo4j DB where the graph was projected from.
507+
Users of Standalone sessions have to stream the results back to the client and the user has to persist it in their target system.
508+
This section will illustrate the built-in remote write-back capability.
508509

509510
By default, write back will happen concurrently, in one transaction per batch.
510511
The behaviour is controlled by three aspects:
@@ -516,7 +517,9 @@ The behaviour is controlled by three aspects:
516517

517518
=== Syntax
518519

519-
[.tabbed-example, caption = asd]
520+
The syntax for remote write-back is identical for Attached and Self-managed sessions.
521+
522+
[.tabbed-example, caption = ]
520523
====
521524
[.include-with-graph-operation]
522525
======
@@ -533,7 +536,7 @@ gds.graph.<operation>.write(
533536
534537
[.include-with-algorithm-write-mode]
535538
======
536-
.Remote graph write-back:
539+
.Remote algorithm write-back:
537540
[source, role=no-test]
538541
----
539542
gds.<algo>.write(
@@ -565,7 +568,7 @@ All write-back endpoints support the following additional configuration:
565568

566569
=== Examples
567570

568-
Extending the previous example, we can write back the FastRP embeddings to the AuraDB instance as follows:
571+
Extending the previous example, we can write back the FastRP embeddings to the Neo4j DB as follows:
569572

570573
.Write mutated FastRP embeddings back to the database:
571574
[source,python,role=no-test]
@@ -590,8 +593,8 @@ gds.wcc.write(
590593

591594
== Querying the database
592595

593-
You can run Cypher queries on the AuraDB instance using the `run_cypher()` method.
594-
There is no restriction on the type of query that can be run, but it is important to note that the query will be run on the AuraDB instance, and not on the GDS Session.
596+
You can run Cypher queries on the Neo4j DB using the `run_cypher()` method.
597+
There is no restriction on the type of query that can be run, but it is important to note that the query will be run on the Neo4j DB, and not on the GDS Session.
595598
Therefore, you will not be able to call any GDS procedures from the `run_cypher()` method.
596599

597600
.Run a Cypher query to find our written-back embeddings:

0 commit comments

Comments
 (0)