Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
83 changes: 83 additions & 0 deletions building-blocks/tasks/adb/create-graph-pgql.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
<!--
{
"name":"Create Graph",
"description":"Create a bipartite Graph for MOVIESTREAM watched movies."
}
-->
1. Click the **Graph** icon to navigate to create your graph. Then click **Create Graph**.

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

2. Enter **`MOVIE_RECOMMENDATIONS`** as the graph name. 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/graph/create-graph-dialog.png " ")

Click **Next**.

3. Change Graph Type to PGQL Property Graph

![Change graph type to PGQL Property Graph](./images/graph/change-graph-type.png " ")

4. Expand **MOVIESTREAM** and select the `CUSTOMER_SAMPLE`, `WATCHED` and `MOVIE` tables.

![Shows how to select tables](./images/graph/selected-tables-pgql.png " ")

Shuttle them to the right using the first icon on the shuttle control.

![Shows the selected tables.](./images/graph/select-tables-pgql.png " ")

Click **Next**.

4. The suggested model has the `MOVIE` and `CUSTOMER_SAMPLE`, as a vertex tables since there are foreign key constraints specified on table `WATCHED` that reference them.

![Shows the vertex and edge table.](./images/graph/create-graph-suggested-model.png " ")

5. You can view and change properties of the graph by clicking on the pencil icon to the right of one of the tables. For example, click `WATCHED` and notice the edge label. You will see this label when viewing and querying the graph. Keep the `WATCHED` label because it will be used in the next lab when querying the graph.

![Changed the label name of the edge to Transfers.](images/graph/edit-edge-label.png " ")

Click **Next**.

6. You may receive a message saying "Errors and warnings for SQL Property Graph. Click **Fix all** to fix the issues Graph Studio detected.

![Graph window indicating potential issues](images/graph/warning-window-pgql.png " ")

<!---
**An alternate approach:** In the earlier Step 5 you could have just updated the CREATE PROPERTY GRAPH statement and saved the updates. That is, you could have just replaced the existing statement with the following one which specifies that the SOURCE KEY is `from_acct_id` and the DESTINATION KEY is `to_acct_id`.

```
-- This is not required if you used swap edge in UI to fix the edge direction.
-- This is only to illustrate an alternate approach.
<copy>
CREATE PROPERTY GRAPH bank_graph
VERTEX TABLES (
BANK_ACCOUNTS as ACCOUNTS
KEY (ACCT_ID)
LABEL ACCOUNTS
PROPERTIES (ACCT_ID, NAME)
)
EDGE TABLES (
BANK_TXNS
KEY (FROM_ACCT_ID, TO_ACCT_ID, AMOUNT)
SOURCE KEY (FROM_ACCT_ID) REFERENCES ACCOUNTS
DESTINATION KEY (TO_ACCT_ID) REFERENCES ACCOUNTS
LABEL TRANSFERS
PROPERTIES (AMOUNT, DESCRIPTION)
)
</copy>
```

![ALT text is not available for this image](images/graph/correct-ddl-save.png " " )

**Important:** Click the **Save** (floppy disk icon) to commit the changes.
--->

7. In the Summary step, click on **Create Graph**

![Shows the job tab with the job status as successful](./images/graph/jobs-create-graph.png " ")

This will open a Create Graph tab. Click **Create Graph**.

![Shows in-memory enabled and the create graph button](./images/graph/create-graph-in-memory.png " ")

Monitor the graph creation process. After a couple of minutes, you should see a successful **Completed** status and you'll be ready to start analyzing the graph!
29 changes: 14 additions & 15 deletions building-blocks/tasks/adb/create-graph.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,40 +4,39 @@
"description":"Create a bipartite Graph for MOVIESTREAM watched movies."
}
-->


1. Click the **Graph** icon to navigate to create your graph. Then click **Create Graph**.
1. Click the **Graph** icon to navigate to create your graph. Then click **Create Graph**.

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

2. Enter **`MOVIE_RECOMMENDATIONS`** as the graph name. 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.
2. Enter **`MOVIE_RECOMMENDATIONS`** as the graph name. 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/graph/create-graph-dialog.png " ")

Click **Next**.
Click **Next**.

3. Expand **MOVIESTREAM** and select the `CUSTOMER_SAMPLE`, `WATCHED` and `MOVIE` tables.

![Shows how to select tables](./images/graph/selected-tables.png " ")

Shuttle them to the right using the first icon on the shuttle control.
Shuttle them to the right using the first icon on the shuttle control.

![Shows the selected tables.](./images/graph/select-tables.png " ")

Click **Next**.

4. The suggested model has the `MOVIE` and `CUSTOMER_SAMPLE`, as a vertex tables since there are foreign key constraints specified on table `WATCHED` that reference them.
4. The suggested model has the `MOVIE` and `CUSTOMER_SAMPLE`, as a vertex tables since there are foreign key constraints specified on table `WATCHED` that reference them.

![Shows the vertex and edge table.](./images/graph/create-graph-suggested-model.png " ")

![Shows the vertex and edge table.](./images/graph/create-graph-suggested-model.png " ")
5. You can view and change properties of the graph by clicking on the pencil icon to the right of one of the tables. For example, click `WATCHED` and notice the edge label. You will see this label when viewing and querying the graph. Keep the `WATCHED` label because it will be used in the next lab when querying the graph.

![Changed the label name of the edge to Transfers.](images/graph/edit-edge-label.png " ")

5. You can view and change properties of the graph by clicking on one of the tables. For example, click `WATCHED` and notice the edge label. You will see this label when viewing and querying the graph. Keep the `WATCHED` label because it will be used in the next lab when querying the graph.
Click **Next**.

![Changed the label name of the edge to Transfers.](images/graph/edit-edge-label.png " ")
6. You may receive a message saying "Errors and warnings for SQL Property Graph. Click **Fix all** to fix the issues Graph Studio detected.

Click **Next**.

![Graph window indicating potential issues](images/graph/warning-window.png " ")

<!---
**An alternate approach:** In the earlier Step 5 you could have just updated the CREATE PROPERTY GRAPH statement and saved the updates. That is, you could have just replaced the existing statement with the following one which specifies that the SOURCE KEY is `from_acct_id` and the DESTINATION KEY is `to_acct_id`.
Expand Down Expand Up @@ -69,11 +68,11 @@
**Important:** Click the **Save** (floppy disk icon) to commit the changes.
--->

6. In the Summary step, click on **Create Graph**:
7. In the Summary step, click on **Create Graph**

![Shows the job tab with the job status as successful](./images/graph/jobs-create-graph.png " ")

This will open a Create Graph tab. Click **Create Graph**.
This will open a Create Graph tab. Click **Create Graph**.

![Shows in-memory enabled and the create graph button](./images/graph/create-graph-in-memory.png " ")

Expand Down
17 changes: 8 additions & 9 deletions building-blocks/tasks/adb/goto-graph-studio.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,26 @@
<!--
{
"name":"Go to Graph Studio",
"description":"Login to Graph Studio from the Autonomous Database OCI console"
"description":"Login to Graph Studio from the Autonomous AI Database OCI console"
}
-->
Graph Studio is a feature of Autonomous AI Database. It is available as an option on the Database Actions Launchpad. You need a graph-enabled user to log into Graph Studio. In this workshop, the graph user has already been created for you.

Graph Studio is a feature of Autonomous Database. It is available as an option on the Database Actions Launchpad. You need a graph-enabled user to log into Graph Studio. In this workshop, the graph user has already been created for you.
1. In your **Autonomous AI Database Details page** page, click the **Database Actions** button, and then select **View all database actions**.

1. In your **Autonomous Database Details page** page, click the **Database Actions** button, and then select **View all database actions**.
![Click the Database Actions button.](images/adb-dbactions-goto.png " ")

![Click the Database Actions button.](images/adb-dbactions-goto.png " ")

>**Note:** Use the Admin credentials to sign in if needed. (The Admin user password is located under **View Login Info** )
>**Note:** Use the Admin credentials to sign in if needed. (The Admin user password is located under **View Login Info** )

2. On the Database Actions panel, click **Graph Studio**.

![Click Open Graph Studio.](images/graph/graphstudiofixed.png " ")

3. Log in to Graph Studio. Use the credentials for the graph user:

The graph user credentials are:
The graph user credentials are:

**Username:** [](var:db_user_name)
**Username:** [](var:db_user_name)
**Password:** *your-password* (e.g. watchS0meMovies#)

![Use the credentials for database user MOVIESTREAM.](images/graph/graph-login.png " ")
![Use the credentials for database user MOVIESTREAM.](images/graph/graph-login.png " ")
Binary file modified building-blocks/tasks/adb/images/adb-dbactions-goto.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 modified building-blocks/tasks/adb/images/graph/create-graph-dialog.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 modified building-blocks/tasks/adb/images/graph/edit-edge-label.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 modified building-blocks/tasks/adb/images/graph/jobs-create-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.
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.