Skip to content

Commit

Permalink
LiveLabs #3683 QA updates (#151)
Browse files Browse the repository at this point in the history
* LiveLabs #3683 QA updates

* Updated QA files

* fixed missing copy tag

* fixed image redaction

* screenshot reupload
  • Loading branch information
denisemyrick authored Nov 6, 2024
1 parent 873b605 commit f5daa25
Show file tree
Hide file tree
Showing 15 changed files with 62 additions and 90 deletions.
16 changes: 5 additions & 11 deletions spatial-python/access-jupyterlab/access-jupyterlab.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ Estimated Lab Time: 5 minutes
* Explore notebook functionality
* Select option for performing remainder of hands-on lab


## Task 1: Retrieve IP address for JupyterLab

1. From the main menu, navigate to Compute > Instances
Expand All @@ -22,18 +21,15 @@ Estimated Lab Time: 5 minutes
2. In the workshop instructions page, click **View Login Info** at the top left and copy your Compartment name.

![Retrieve IP address](images/compartment.png)


1. In the OCI console, paste in your Compartment name and select it from the pull-down.

3. In the OCI console, paste in your Compartment name and select it from the pull-down.

![Retrieve IP address](images/compute-02.png)


4. Note the Public IP of your compute instance. JupyerLab has been set on on this instance. You will use this later in this and other Labs.
4. Note the Public IP of your compute instance. JupyerLab has been set on on this instance. You will use this later in this and other Labs.

![Retrieve IP address](images/compute-03.png)


## Task 2: Verify access to JupyterLab

1. Open a new browser tab and enter the URL **http://[IP address]:8001/lab** where [IP address] is the address retrieved in Task 1.
Expand All @@ -42,7 +38,7 @@ Estimated Lab Time: 5 minutes

2. Enter the password **livelabs** and click **Log in**.

## Task 2: Explore Jupyter Notebooks
## Task 3: Explore Jupyter Notebooks

Jupyter Notebook is an interactive web-based tool that allows you to create and share documents that contain live code, equations, visualizations, and text. It is widely used in the data science community for prototyping and data analysis.

Expand All @@ -62,7 +58,6 @@ In this task, we will walk through the basics of using Jupyter Notebook.

![create a new Python notebook](./images/launcher3.png)


2. Add some markdown Text.

Click on the code cell and use the use the cell type drop down to select 'Markdown'
Expand Down Expand Up @@ -93,9 +88,8 @@ In this task, we will walk through the basics of using Jupyter Notebook.

4. To save a Jupyter Notebook, click on the "Save" icon on the toolbar, or press Ctrl+S (or Cmd+S on macOS). The notebook will be saved with the .ipynb file extension.


## Acknowledgements

- **Author** - David Lapp, Database Product Management, Oracle
- **Contributors** - Rahul Tasker, Denise Myrick, Ramu Gutierrez
- **Last Updated By/Date** - David Lapp, August 2023
- **Last Updated By/Date** - Denise Myrick, November 2024
30 changes: 14 additions & 16 deletions spatial-python/connect-to-adb/connect-to-adb.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
# Connect to Autonomous Database from Python


## Introduction

To prepare for data loading and analysis, you first establish a connection from Python to your Autonomous Database. The python-oracledb driver supports this connection and all subsequent database interactions. You will use the python-oracledb driver's ‘Thin’ mode which connects directly to Oracle Database and does not need Oracle Client libraries.
To prepare for data loading and analysis, you first establish a connection from Python to your Autonomous Database. The python-oracledb driver supports this connection and all subsequent database interactions. You will use the python-oracledb driver's ‘Thin’ mode which connects directly to Oracle Database and does not need Oracle Client libraries.

Estimated Lab Time: 5 minutes

Expand All @@ -17,10 +16,10 @@ Estimated Lab Time: 5 minutes

## Task 1: Create connection parameter files

1. To avoid including database connection information directly in your notebook, you create files with this information which your notebook can reference. In JupyterLab, click on the Text File tile to create a new text file.
1. To avoid including database connection information directly in your notebook, you create files with this information which your notebook can reference. In JupyterLab, click on the Text File tile to create a new text file.
![Connect to ADB](images/connect-to-adb-01.png)

2. Enter your ADB ADMIN user password. Then from the File menu select **Save Text**.
2. Enter your ADB ADMIN user password. Then from the File menu select **Save Text**.
![Connect to ADB](images/connect-to-adb-02.png)

3. When prompted enter **my-pwd.txt** as your file name and click **Rename**.
Expand All @@ -30,12 +29,12 @@ Estimated Lab Time: 5 minutes
![Connect to ADB](images/connect-to-adb-04.png)

5. Return to your Oracle Cloud browser tab click on **Database Connection**.
![Connect to ADB](images/connect-to-adb-06.png)
![Connect to ADB](images/connect-to-adb-06-v3a.png)

1. Scroll down to the Connection Strings section. For TLS Authentication, select **TLS**. This is required to allow Thin mode connections. Then Under Connection String click **Copy** for the TNS Name ending in \_low.
6. Scroll down to the Connection Strings section. For TLS Authentication, select **TLS**. This is required to allow Thin mode connections. Then Under Connection String click **Copy** for the TNS Name ending in \_low.
![Connect to ADB](images/connect-to-adb-07.png)

1. Return to your JupyterLab browser tab. As done previously, click on the Text File tile to create another new text file. Paste the connection string just copied from your Autonomous Database. Then save the file and rename to **my-dsn.txt**.
7. Return to your JupyterLab browser tab. As done previously, click on the Text File tile to create another new text file. Paste the connection string just copied from your Autonomous Database. Then save the file and rename to **my-dsn.txt**.
![Connect to ADB](images/connect-to-adb-08.png)

As done previously, close the text file tab to return to the Launcher page.
Expand All @@ -45,7 +44,7 @@ Estimated Lab Time: 5 minutes
1. From the Launcher, click the **Python 3** tile to create a new notebook.
![Connect to ADB](images/connect-to-adb-09.png)

1. In the first cell, paste the following statement and then click the **run** button. This loads the python-oracedb module which handles interaction with Oracle Database.
2. In the first cell, paste the following statement and then click the **run** button. This loads the python-oracledb module which handles interaction with Oracle Database.

```
<copy>
Expand All @@ -54,7 +53,7 @@ Estimated Lab Time: 5 minutes
```
![Connect to ADB](images/connect-to-adb-10.png)
2. In the next cell, paste the following statements and then click the **run** button. This loads your ADB password and DSN into variables
3. In the next cell, paste the following statements and then click the **run** button. This loads your ADB password and DSN into variables
```
<copy>
Expand All @@ -65,7 +64,7 @@ Estimated Lab Time: 5 minutes
```
![Connect to ADB](images/connect-to-adb-11.png)
3. In the next cell, paste the following statements and then click the **run** button. This creates a connection to your ADB.
4. In the next cell, paste the following statements and then click the **run** button. This creates a connection to your ADB.
```
<copy>
Expand All @@ -76,7 +75,7 @@ Estimated Lab Time: 5 minutes
```
![Connect to ADB](images/connect-to-adb-12.png)
3. In the next cell, paste the following statements and then click the **run** button. This runs a test query to verify successful connection to ADB.
5. In the next cell, paste the following statements and then click the **run** button. This runs a test query to verify successful connection to ADB.
```
<copy>
Expand All @@ -88,23 +87,22 @@ Estimated Lab Time: 5 minutes
```
![Connect to ADB](images/connect-to-adb-13.png)
4. Right-click on your notebook file Untitled.ipynb in the left panel and select **Rename**.
6. Right-click on your notebook file Untitled.ipynb in the left panel and select **Rename**.
![Connect to ADB](images/connect-to-adb-14.png)
5. Enter **my-notebook** (or a name of your choosing). Observe the notebook name is changed.
7. Enter **my-notebook** (or a name of your choosing). Observe the notebook name is changed.
![Connect to ADB](images/connect-to-adb-15.png)
You may now **proceed to the next lab**.
## Learn More
* For more info on python-oracledb connections to Autonomous Database, please see the [documentation](https://python-oracledb.readthedocs.io/en/latest/user_guide/connection_handling.html#connecting-to-oracle-cloud-autonomous-databases).
## Acknowledgements
- **Author** - David Lapp, Database Product Management, Oracle
- **Contributors** - Rahul Tasker, Denise Myrick, Ramu Gutierrez
- **Last Updated By/Date** - David Lapp, August 2023
- **Last Updated By/Date** - Denise Myrick, November 2024
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 not shown.
50 changes: 22 additions & 28 deletions spatial-python/create-adb/create-adb.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# Create Autonomous Database


## Introduction

Oracle Autonomous Database is a self-driving, self-securing, self-repairing database service, including Oracle Spatial, with offerings for data warehousing and transaction processing workloads. You do not need to configure or manage any hardware, or install any software. Oracle Cloud Infrastructure handles creating the database, as well as backing up, patching, upgrading, and tuning the database. As this workshop focuses on an analytic use case, you create an Autonomous Date Warehouse (ADW).
Expand All @@ -9,7 +8,7 @@ Estimated Lab Time: 5 minutes

### Objectives

* Create an Autonomous Database instance
* Create an Autonomous Database instance

### Prerequisites

Expand All @@ -20,33 +19,30 @@ Estimated Lab Time: 5 minutes
1. From the main navigation panel select **Oracle Database**, then select **Autonomous Database**.
![Navigate to Oracle Database](images/adb-01.png)

1. Your Compartment should still be selected. If not then re-select it. Then click **Create Autonomous Database**.

![Select compartment](images/adb-02.png)
2. Your Compartment should still be selected. If not then re-select it. Then click **Create Autonomous Database**.

1. For display name enter **my-adw**. Leave the database name as the default value. Leave workload type as Data Warehouse.
![Select compartment](images/adb-02.png)

**Note:** You must select workload type Data Warehouse. Selecting Transaction Processing will result in a quota error.
3. For display name enter **my-adw**. Leave the database name as the default value. Leave workload type as Data Warehouse.

![Create ADW](images/adb-03.png)
**Note:** You must select workload type Data Warehouse. Selecting Transaction Processing will result in a quota error.

2. For deployment type leave the default **Serverless**. Also leave the defaults for version (19c), ECPU count (2), and storage (1TB). Then scroll down.
![Create ADW](images/adb-04.png)
![Create ADW](images/adb-03.png)

3. Enter and confirm a password for the database ADMIN user. Then scroll down.
![Create ADW](images/adb-05.png)
4. For deployment type leave the default **Serverless**. Also leave the defaults for version (23ai), ECPU count (2), and storage (1TB). Then scroll down.
![Create ADW](images/adb-04v2.png)

4. In the next lab, you will be creating to a connection from Python to Autonomous Database using a simple method that does not require an Oracle Client install or Cloud Wallet. To use this method you must pre-configure your Autonomous Database to allow access from the compute instance hosting Python. For network access, select **Secure access from allowed IPs and VCNs only**. Under Values, enter the compute IP address from Lab 1 Task 1.
![Create ADW](images/adb-07.png)
5. Enter and confirm a password for the database ADMIN user. Then scroll down.
![Create ADW](images/adb-05.png)

1. In the next section select **Bring your own license (BYOL)** and **Oracle Database Enterprise Edition (EE)**. For contacts, enter your email address. Then click **Create Autonomous Database**.
![Create ADW](images/adb-08.png)
6. In the next lab, you will be creating to a connection from Python to Autonomous Database using a simple method that does not require an Oracle Client install or Cloud Wallet. To use this method you must pre-configure your Autonomous Database to allow access from the compute instance hosting Python. For network access, select **Secure access from allowed IPs and VCNs only**. Under Values, enter the compute IP address from Lab 1 Task 1.
![Create ADW](images/adb-07.png)

1. ADB provisioning will begin.
![Create ADW](images/adb-09.png)
7. ADB provisioning will begin.
![Create ADW](images/adb-09v2.png)

1. When provisioning is complete your ADB is ready.
![Create ADW](images/adb-10.png)
8. When provisioning is complete your ADB is ready.
![Create ADW](images/adb-10v2.png)

## Task 2: Select option for performing the remainder of this hands-on lab

Expand All @@ -56,26 +52,24 @@ The remainder of this hands-on lab may be performed using either of the followin

1. Proceed to **Lab 3** and then subsequent labs.


**Option 2:** Load a pre-built notebook with all steps and run each cell.

1. Perform **Lab 3 - Task 1**
**Option 2:** Load a pre-built notebook with all steps and run each cell.

1. Perform **Lab 3 - Task 1**
2. Perform **Lab 4 - Task 1**
3. Perform **Lab 6 - Task 4 - Steps 5-6**
4. Click the following link to download the pre-built notebook to you laptop:
* [prebuit-notebook.ipynb](../access-jupyterlab/files/prebuilt-notebook.ipynb)
* [prebuilt-notebook.ipynb](../access-jupyterlab/files/prebuilt-notebook.ipynb)

5. Click the upload button and select the prebuilt notebook.

![Use prebuilt notebook](./images/prebuilt-nb-01.png)

6. Double-click on the prebuilt notebook to open it and run each cell.

![Use prebuilt notebook](./images/prebuilt-nb-02.png)


## Acknowledgements

- **Author** - David Lapp, Database Product Management, Oracle
- **Contributors** - Rahul Tasker, Denise Myrick, Ramu Gutierrez
- **Last Updated By/Date** - David Lapp, August 2023
- **Last Updated By/Date** - Denise Myrick, November 2024
Binary file removed spatial-python/create-adb/images/adb-04.png
Binary file not shown.
Binary file added spatial-python/create-adb/images/adb-04v2.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 removed spatial-python/create-adb/images/adb-09.png
Binary file not shown.
Binary file added spatial-python/create-adb/images/adb-09v2.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 removed spatial-python/create-adb/images/adb-10.png
Binary file not shown.
Binary file added spatial-python/create-adb/images/adb-10v2.png
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 f5daa25

Please sign in to comment.