|
30 | 30 | "\n", |
31 | 31 | "The notebook shows how to use the `graphdatascience` Python library to create, manage, and use a GDS Session.\n", |
32 | 32 | "\n", |
33 | | - "We consider a graph of people and fruits, which we're using as a simple example to show how to connect your AuraDB instance to a GDS Session, run algorithms, and eventually write back your analytical results to the AuraDB database. \n", |
34 | | - "We will cover all management operations: creation, listing, and deletion.\n", |
35 | | - "\n", |
36 | | - "If you are using self managed DB, follow [this example](../graph-analytics-serverless-self-managed)." |
| 33 | + "We consider a graph of bicycle rentals, which we're using as a simple example to show how project data from Spark to a GDS Session, run algorithms, and eventually retrieving the results back to Spark.\n", |
| 34 | + "We will cover all management operations: creation, listing, and deletion." |
37 | 35 | ] |
38 | 36 | }, |
39 | 37 | { |
|
157 | 155 | "# Create a GDS session!\n", |
158 | 156 | "gds = sessions.get_or_create(\n", |
159 | 157 | " # we give it a representative name\n", |
160 | | - " session_name=\"people_and_fruits\",\n", |
| 158 | + " session_name=\"bike_trips\",\n", |
161 | 159 | " memory=SessionMemory.m_2GB,\n", |
162 | 160 | " ttl=timedelta(minutes=30),\n", |
163 | 161 | " cloud_location=CloudLocation(\"gcp\", \"europe-west1\"),\n", |
|
216 | 214 | "1. Send an action `v2/graph.project.fromTriplets`\n", |
217 | 215 | " This will initialize the import process and allows us to specify the graph name, and settings like `undirected_relationship_types`. It returns a job id, that we need to reference the import job in the following steps.\n", |
218 | 216 | "2. Send the data in batches to the arrow server.\n", |
219 | | - "3. Send another action called `v2/graph.project.fromTriples.done` to tell the import process that no more data will be send. This will trigger the final graph creation inside the session.\n", |
| 217 | + "3. Send another action called `v2/graph.project.fromTriplets.done` to tell the import process that no more data will be send. This will trigger the final graph creation inside the session.\n", |
220 | 218 | "4. Wait for the import process to reach the `DONE` state.\n", |
221 | 219 | "\n", |
222 | 220 | "While the overall process is straight forward, we need to somehow tell Spark to" |
|
295 | 293 | "source": [ |
296 | 294 | "## Sending the computation result back to Spark\n", |
297 | 295 | "\n", |
298 | | - "Once the computation is done. We might want to further use the result in Spark.\n", |
299 | | - "We can do this in a similar to the projection, by streaming batches of data into each of the Spark workers.\n", |
| 296 | + "Once the computation is done, we might want to further use the result in Spark.\n", |
| 297 | + "We can do this in a similar way to the projection, by streaming batches of data into each of the Spark workers.\n", |
300 | 298 | "Retrieving the data is a bit more complicated since we need some input data frame in order to trigger computations on the Spark workers.\n", |
301 | 299 | "We use a data range equal to the size of workers we have in our cluster as our driving table.\n", |
302 | 300 | "On the workers we will disregard the input and instead stream the computation data from the GDS Session." |
|
0 commit comments