Skip to content

Commit

Permalink
WMS ID 11390 - added more steps (#740)
Browse files Browse the repository at this point in the history
* WMS ID 11390 - added more steps

* WMS ID 11694 - added a short version for the 15 mins LL

* added PAR link

* change title to imperative verb
  • Loading branch information
ramumg authored Dec 20, 2024
1 parent c306d34 commit 6a6e7cd
Show file tree
Hide file tree
Showing 26 changed files with 697 additions and 139 deletions.
74 changes: 28 additions & 46 deletions 23aifree/create-graph/create-graph.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Setup User
# Setup

## Introduction

Expand All @@ -23,11 +23,13 @@ Watch the video below for a quick walk-through of the lab. The lab instructions
[Change password](videohub:1_x4hgmc2i)
</if> -->

## Task 1: Download setup materials
## Task 1: Setup materials

These files we will not be using throughout the lab, but are available if you would like to see what commands we chose to create the schema with (CreateKeys.sql) or the data that populates the tables that we've created (BANK\_ACCOUNTS.csv and BANK\_TRANSFERS.csv).

1. Click [this link] (https://c4u04.objectstorage.us-ashburn-1.oci.customer-oci.com/p/EcTjWk2IuZPZeNnD_fYMcgUhdNDIDA6rt9gaFj_WZMiL7VvxPBNMY60837hu5hga/n/c4u04/b/livelabsfiles/o/data-management-library-files/23aifree-property-graph.zip) to download the zip file with our property graph setup materials.

2. Unzip the files. You should see these files available. Most of these files we will not be using throughout the lab, but are available if you would like to see what commands we chose to create the schema with (CreateKeys.sql) or the data that populates the tables that we've created (BANK\_ACCOUNTS.csv and BANK\_TRANSFERS.csv).
2. Unzip the files. You should see these files available.

![Content of the zip file](images/1-unzip.png)

Expand Down Expand Up @@ -67,63 +69,43 @@ Watch the video below for a quick walk-through of the lab. The lab instructions

![Signing into Graph Studio](images/3-graph-studio-login.png)

4. Click on the Graph symbol on the left-hand side menu.

![Navigating to graph symbol on menu](images/4-nav-graphs.png)

5. Click </> Query.

![Graph homepage](images/5-query.png)

6. Use the following SQL statement to create a property graph called BANK\_GRAPH using the BANK\_ACCOUNTS table as the vertices and the BANK_TRANSFERS table as edges. Paste this into the text box:

```
<copy>
CREATE PROPERTY GRAPH BANK_GRAPH
VERTEX TABLES (
BANK_ACCOUNTS
KEY (ID)
PROPERTIES (ID, Name, Balance)
)
EDGE TABLES (
BANK_TRANSFERS
KEY (TXN_ID)
SOURCE KEY (src_acct_id) REFERENCES BANK_ACCOUNTS(ID)
DESTINATION KEY (dst_acct_id) REFERENCES BANK_ACCOUNTS(ID)
PROPERTIES (src_acct_id, dst_acct_id, amount)
) OPTIONS (PG_SQL);
</copy>
```
3. Click the **Graph** icon to navigate to create your graph.
Then click **Create Graph**.

![Shows where the create button modeler is](images/graph-create-button.png " ")

![Query to create graph is inside textbox](images/6-create-graph.png)
4. Enter `bank_graph` as the graph name, then click **next**. The description is optional.
That graph name is used throughout the next lab. **Do not enter a different name** because then the queries and code snippets in the next lab will fail.

![Shows the create graph window where you assign the graph a name](./images/create-graph-dialog.png " ")

7. Click Run. It should say Graph Successfully Created as a result at the bottom.
5. Expand **GRAPHUSER** and select the `BANK_ACCOUNTS` and `BANK_TRANSFERS` tables.

![Graph successfully created](images/7-graph-create-success.png)
![Shows how to select the BANK_ACCOUNTS and BANK_TXNS](./images/select-tables.png " ")

## Task 3: Spin up the Notebook
6. Move them to the right, that is, click the first icon on the shuttle control.

1. Click the notebook icon on the left hand menu.
![Shows the selected tables](./images/selected-tables.png " ")

![Click notebook icon](images/8-nav-notebook.png)
7. Click **Next**.

2. Click Create.
The suggested graph has the `BANK_ACCOUNTS` as a vertex table since there are foreign key constraints specified on `BANK_TRANSFERS` that reference it.

![Creating notebook button clicked](images/8-create-notebook.png)
And `BANK_TRANSFERS` is a suggested edge table. Click **Next**.

3. You can name the notebook BANK_GRAPH. The description will be Notebook for Operational Property Graphs LiveLab. You can leave the tags empty.
![Shows the vertex and edge table](./images/create-graph-suggested-model.png " ")

![Notebook information being filled out](images/9-notebook-info.png)
7. In the Summary step, click on **Create Graph**. This will open a Create Graph tab, click on **Create Graph.

4. You'll see a message saying that Graph Studio is being attached to an internal compute environment. The notebook will allow us to run PGQ queries against our bank schema, but first needs to spin up. It should take less than a minute.
![Shows the job tab with the job status as successful](./images/jobs-create-graph.png " ")

![Graph Studio attaching to internal compute environment](images/10-attach-graph.png)
This will open a Create Graph tab, click on **Create Graph**.

5. Once it finishes, it should look like this. You can see the DETACHED message in the upper right corner turn to say ATTACHED with a green light.
![Shows in-memory enabled and the create graph button](./images/create-graph-in-memory.png " ")

![Environment was attached](images/11-notebook-success.png)
The BANK_GRAPH is a view on the underlying tables and metadata, this means that no data is duplicated.

6. You may now proceed to the next lab.
You may now proceed to the next lab.

## Learn More

Expand All @@ -132,4 +114,4 @@ Watch the video below for a quick walk-through of the lab. The lab instructions
## Acknowledgements
* **Author** - Kaylien Phan, William Masdon
* **Contributors** - David Start
* **Last Updated By/Date** - Kaylien Phan, Database Product Management, April 2023
* **Last Updated By/Date** - Ramu Murakami Gutierrez, December 2024
Binary file modified 23aifree/create-graph/images/5-query.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 23aifree/create-graph/images/select-tables.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 23aifree/create-graph/images/selected-tables.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 23aifree/property-graphs/images/2-hops.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 23aifree/property-graphs/images/4-hops.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 23aifree/property-graphs/images/5-hops.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 23aifree/property-graphs/images/deepwalk.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 23aifree/property-graphs/images/deepwalk387.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 23aifree/property-graphs/images/deepwalk934.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 23aifree/property-graphs/images/load-graph.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 23aifree/property-graphs/images/run-pagerank.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 23aifree/property-graphs/images/task3step1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 23aifree/property-graphs/images/task3step2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 6a6e7cd

Please sign in to comment.