Skip to content

Commit

Permalink
Chat with Your Data in Autonomous Database Using Generative AI (#272)
Browse files Browse the repository at this point in the history
* updated manifest in adb-dcat workshop and one sprint

* Changed the "Last Updated" date

Updated the Last Updated data in the Acknowledgement section of all labs.

* Updated Marty's scripts to correct error running the workshop

* Marty's feedback on changes

* Update sync-adb-dcat.md

* Update sync-adb-dcat.md

* Quarterly updates and Redwood theme (incomplete workshop)

QA and updates in process.

* Update introduction.md

* Quarterly update & Redwood changes

* Push self-qa changes to fork

* updates for self-QA

* Update cleanup.md

* New workshop WMS ID 11351

* Update manifest.json

* Update introduction.md

* updated labs and tasks

* Update load-os-data-public.md

* more updates

* more updates

* final changes to labs

* changes

* update

* new updates

* Update load-os-data-private.md

* Update load-os-data-public.md

* updates

* Update config-file-preview.png

* more updates

* add a new lab 7 to the adw data lake workshop

A new lab 7 plus other changes to existing labs.

* Update query-data-lakes.md

* Update query-data-lakes.md

* Update query-data-lakes.md

* push new changes to fork

updated the introduction and lab 7.

* Update click-database-actions.png

* new lab 8

* new task in new lab

* update date

* deleted unused lab

* removed un-used lab

* Update setup-workshop-environment.md

* Update setup-workshop-environment.md

* Update query-performance.md

* updates to lab 8

* Update describe-custsales.png

* Update query-performance.md

* Update query-performance.md

* Update query-performance.md

* Update run-query-2.png

* Update cleanup.md

* Update introduction.md

* Delete ADB-terminated.png

* new lab 8 & minor changes

* Update oracle-data-provider.md

* updates to new lab 8

* Update oracle-data-provider.md

* updates

* updates to new labs

* Update adw-dcat-integrate.md

* Update oracle-data-provider.md

* Update oracle-data-provider.md

* new lab

* Update manifest.json

* updates

* Update use-delta-sharing.md

* Update use-delta-sharing.md

* Update use-delta-sharing.md

* livelabs folder

* Update adw-dcat-integrate.md

* updates

* updates to Introduction lab

* Update introduction.md

* LiveLabs workshop version and other freetier changes

* Update introduction.md

* Update introduction.md

* livelabs and freetier changes

* Update load-analyze-json.md

* Update load-analyze-rest.md

* more changes

* more updates

* more updates

* Update adw-dcat-integrate.md

* changed shared with serverless as deployment type

* Update load-local-data.md

* update shared to serverless

* update adb-dcat workshop

* added new lab 12

* Update manifest.json

* added new folder with an .md file in it

Please work!

* more testing

* Delete introduction.md

* new workshop and labs wip

* update labs

* more updates

* more updates

* more updates

* updates

* more updates

* updates before review cycle

* Update endpoint.png

* Update setup-workshop-environment.md

* Update setup-workshop-environment.md

* more updates

* final update before review

* updates

* replacement code

* Update create-share-recipients.md

* Update create-share-recipients.md

* Update create-share-recipients.md

* Update create-share-recipients.md

* Update create-share-recipients.md

* Update create-share-recipients.md

* updates

* Update manifest.json

* folder rename

* added content to data studio folder

* Delete user-bucket-credential-diagram.png

* updates self-qa

* Update introduction.md

* remove extra text files

* Update introduction.md

* Update setup-workshop-environment.md

* Data Studio Workshop Changes

* changes to data studio workshop

* Update setup-workshop-environment.md

* adb changes

* Update recipient-diagram.png

* diagram change

* Update user-bucket-credential-diagram.png

* SME feedback

* Update create-share.md

* Nilay changes

* changes

* Update consume-share.md

* Anoosha's feedback

* Update consume-share.md

* updated 2 screens and a sentence

* minor changes

* deleted extra images and added doc references

* new ECPU changes

* more changes to data sharing workshops

* more changes to fork (data studio)

* more changes

* Marty's feedback

* Marty's feedback to plsql workshop too

* Update setup-workshop-environment.md

* Delete 7381.png

* workshop # 3 ADB set up

and a couple of minor typos in workshops 1 and 2

* changes to adb-dcat workshop

* more changes

* minor typos in all 4 workshops

* quarterly qa build data lake

* new lab 11 in build DL with ADW

* minor changes database actions drop-down list

* final changes to build data lake workshop

* AI updates

AI workshop updates

* ai workshop updates

* Update query-using-select-ai.md

* Update query-using-select-ai.md

* updates

* more updates

* Update query-using-select-ai.md

* more new updates to ai workshop

* Update query-using-select-ai.md

* a new screen capture

* push Marty's feedback to fork

Final changes.

* updates sandbox manifest

* updates

* restored sandbox manifest

* Update setup-environment.md

* updates after CloudWorld

* final updates to ai workshop (also new labs 4 and 5)

* marty's feedback

* incorporated feedback

* minor PR edits by Sarah

* removed steps 7 & 8 Lab 2 > Task 3 per Alexey

The customer asked to remove this as it's not a requirement for the bucket to be public.

* more changes

* more changes per Alexey

* Update load-os-data-public.md

* Quarterly QA

I added a new step per the PM's request in the Data Sharing PL/SQL workshop. I also made a minor edit (removed space) in the Data Lake workshop.

* more updates

* Quarterly QA changes

* Update consume-share.md

* minor edit based on workshop user

* quarterly qa November 2023

* Added new videos to the workshop

Replaced 3 old silent videos with new ones. Added two new videos.

* Adding important notes to the two data sharing workshops

Per the PM's request.

* folder structure only  push to production

This push and the PR later is to make sure the folder structure is in the production repo before I start development. Only 1 .md file and the workshops folder.

* typos

* cloud links workshop

* UPDATES

* Update query-view.png

* update

* minor updates to chat ai workshop (Fork)

* test clones

* test pr

---------

Co-authored-by: Michelle Malcher <[email protected]>
Co-authored-by: Sarah Hirschfeld <[email protected]>
  • Loading branch information
3 people authored Jan 11, 2024
1 parent e438041 commit aa0cf8a
Show file tree
Hide file tree
Showing 207 changed files with 1,509 additions and 21 deletions.
2 changes: 1 addition & 1 deletion shared/adb-speaks-human/cleanup/cleanup.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ If you created an optional compartment for this workshop, you can delete it if y
## Acknowledgements

* **Author:** Lauran K. Serhal, Consulting User Assistance Developer
* **Last Updated By/Date:** Lauran K. Serhal, October 2023
* **Last Updated By/Date:** Lauran K. Serhal, December 2023

Data about movies in this workshop were sourced from Wikipedia.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ You may now proceed to the next lab.
## Acknowledgements
* **Author:** Lauran K. Serhal, Consulting User Assistance Developer
* **Contributors:** Marty Gubar, Product Management
* **Last Updated By/Date:** Lauran K. Serhal, October 2023
* **Last Updated By/Date:** Lauran K. Serhal, January 2024
Data about movies in this workshop were sourced from **Wikipedia**.
Expand Down
2 changes: 1 addition & 1 deletion shared/adb-speaks-human/introduction/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ You may now proceed to the next lab.
## Acknowledgements
* **Author:** Lauran K. Serhal, Consulting User Assistance Developer
* **Contributor:** Marty Gubar, Product Manager
* **Last Updated By/Date:** Lauran K. Serhal, October 2023
* **Last Updated By/Date:** Lauran K. Serhal, January 2024

Data about movies in this workshop were sourced from **Wikipedia**.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,8 @@ _**In summary, using LLMs infer a lot from human language. It's always good to v
You can import, create, and work with notebooks in Oracle Machine Learning Notebooks. You can access Oracle Machine Learning Notebooks from Autonomous Database.
>**Note:** You can run **`Select AI`** SQL queries from most tools; however, it is not yet supported by the **SQL Worksheet**.
If you already have the **SQL| Oracle Database Actions** browser tab open from the previous lab, click the **Database Actions | SQL banner** to display the Database **Actions | Launchpad** Home page. In the **Development** section, click the **Oracle Machine Learning** card to display the **Sign In** page. Continue with step **step 7** below.
![Click the banner](./images/click-banner.png " ")
Expand Down Expand Up @@ -277,7 +279,7 @@ You may now proceed to the next lab.
* **Author:** Lauran K. Serhal, Consulting User Assistance Developer
* **Contributor:** Marty Gubar, Product Manager
* **Last Updated By/Date:** Lauran K. Serhal, October 2023
* **Last Updated By/Date:** Lauran K. Serhal, January 2024
Data about movies in this workshop were sourced from **Wikipedia**.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ You may now proceed to the next lab.

* **Author:** Lauran K. Serhal, Consulting User Assistance Developer
* **Contributor:** Marty Gubar, Product Manager
* **Last Updated By/Date:** Lauran K. Serhal, October 2023
* **Last Updated By/Date:** Lauran K. Serhal, January 2024

Data about movies in this workshop were sourced from **Wikipedia**.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ You may now proceed to the next lab.
## Acknowledgements
* **Author:** Lauran K. Serhal, Consulting User Assistance Developer
* **Contributors:** Marty Gubar, Product Management
* **Last Updated By/Date:** Lauran K. Serhal, October 2023
* **Last Updated By/Date:** Lauran K. Serhal, January 2024

Data about movies in this workshop were sourced from **Wikipedia**.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ This concludes the workshop.
## Acknowledgements

* **Author:** Lauran Serhal, Consulting User Assistance Developer, Oracle Autonomous Database and Big Data
* **Last Updated By/Date:** Lauran Serhal, October 2023
* **Last Updated By/Date:** Lauran Serhal, January 2024

Data about movies in this workshop were sourced from Wikipedia.

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,300 @@
# Consume the Data Share by the Recipient

## Introduction

In this lab you will learn how to consume the data in your available data share as a recipient.

![Recipient diagram.](images/recipient-diagram.png)

Estimated Time: 10 minutes

### Objectives

In this lab, you will:

* Create a share consumer user.
* Grant the share consumer privileges to the share provider.
* Discover the available data shares and tables.
* Create a share link and a view using the data share table.

### Prerequisites

This lab assumes that you have successfully completed all of the preceding labs in the **Contents** menu on the left.

## Task 1: (Optional) Create a Share Consumer User

In this lab, you will log in as the `admin` user to create a database user (schema) that will be used to consume the data share that the `share_provider` user created and shared with the `live_share_oracle_user` recipient. If you already have an existing schema with the appropriate privileges, you can use it. We chose to separate the share\_provider user (schema) from the share\_consumer user (schema) to simulate a real use case of data sharing between a provider and a consumer.

1. Log out of the `share_provider` user. On the **Oracle Database Actions | SQL** banner, click the drop-down list next to the `SHARE_PROVIDER` user, and then select **Sign Out** from the drop-down menu. Click **Leave**.

2. Log in as the **`admin`** user. On the **Sign-in** page, enter **`admin`** as the username and **`TrainingADW`** as the password, and then click **Sign in**.

3. In the **Development** section, click the **SQL** card.

4. Create a new consumer user named **`share_consumer`**. Copy and paste the following script into your SQL Worksheet, and then click the **Run Script (F5)** icon.

```
<copy>
-- Create a new user that will consume the shared data.
CREATE USER share_consumer IDENTIFIED BY DataShare4ADW;
-- Grant the new user the required roles.
GRANT CONNECT TO share_consumer;
GRANT DWROLE TO share_consumer;
GRANT RESOURCE TO share_consumer;
GRANT UNLIMITED TABLESPACE TO share_consumer;
BEGIN
ORDS_ADMIN.ENABLE_SCHEMA
(p_enabled => TRUE,
p_schema => 'share_consumer',
p_url_mapping_type => 'BASE_PATH',
p_auto_rest_auth=> TRUE );
END;
/
</copy>
```
![Run the script](images/run-script.png)
The results are displayed in the **Script Output** tab.
![View the script results](images/script-results.png)
At this point, the **`share_consumer`** user doesn't have the required privileges to read cloud links yet.
## Task 2: Grant the Share Consumer Privileges to the Share Provider
1. To consume a live share, a recipient user must have the required privileges to access the live share. The **`PRIV_CONSUME_ORACLE_SHARE`** privilege allows the specified user to consume Oracle-to-Oracle live shares. Copy and paste the following script into your SQL Worksheet, and then click the **Run Script** icon.
```
<copy>
BEGIN
DBMS_SHARE.ENABLE_SCHEMA(
'share_consumer',
enabled=>TRUE,
privileges=>dbms_share.PRIV_CONSUME_ORACLE_SHARE);
END;
/
</copy>
```
![Enable share_consumer schema.](images/enable-share-consumer-schema.png)
2. Log out of the `admin` user. On the **Oracle Database Actions | SQL** banner, click the drop-down list next to the `ADMIN` user, and then select **Sign Out** from the drop-down menu. Click **Leave**.
3. Log in as the newly created user, `share_consumer`. On the **Sign-in** page, enter **`share_consumer`** as the username and **`DataShare4ADW`** as the password, and then click **Sign in**.
![Log in as share_consumer](images/login-share-consumer.png)
You are now logged in as the `share_consumer` user. In the **Development** section, click the **SQL** card to display the SQL Worksheet.
4. Verify that you as the `share_consumer` have the privilege to read the data share. You can use the following query to check if the current session user is enabled for `READ` access to a data set.
```
<copy>
SELECT SYS_CONTEXT('USERENV','CLOUD_LINK_READ_ENABLED')
FROM dual;
</copy>
```
![Have access to cloud links?](images/cloud-links-access.png)
The `YES` indicates that the `share_consumer` user is enabled for `READ` access to a data set.
5. Query the share providers that are available to the `share_consumer` user.
```
<copy>
SELECT provider_name, description, contact
FROM all_available_oracle_share_providers
</copy>
```
![Check the available providers](images/available-providers.png)
>**Note:** If the above query doesn't show the published data share, wait for a few more minutes until the publishing process is completed, and then run the query again.
6. Copy the value for the **`provider_name`** entry that starts with **`live_share_provider`**. You will need this value in the next task. Click the **eye** icon. The **`provider_name`** value is displayed.
![Copy the sharing id value](images/copy-provider-name.png)
7. Click the **`provider_name`** value to highlight it and copy it.
![Copy the highlighted provider_name value](images/highlight-provider-name.png)
Next, paste the copied value into your text editor file.
![Paste the value into a text editor file](images/paste-provider-name-value.png)
## Task 3: Discover Available Data Shares and Tables
1. Obtain the share provider's ID. _**Important:** Copy and paste the following script into your SQL Worksheet; **however, don't run it yet**. Replace the text place holder in the script for the **`provider_name`** argument with your own **`provider_name`** value that you obtained (and saved in a text editor file) in the previous task._ Next, click the **Run Script** icon.
```
<copy>
declare
oracle_provider_id VARCHAR2(64);
BEGIN
SELECT oracle_provider_id INTO oracle_provider_id
FROM all_available_oracle_share_providers
WHERE provider_name = 'enter the share provider name here';
SYS.DBMS_OUTPUT.PUT_LINE('provider id = ' || oracle_provider_id);
END;
/
</copy>
```
![Get provider id](images/get-provider-id.png)
Copy the value of the returned **provider id** as you will need it in the next step.
2. Subscribe to the data share provider by creating a new share provider name that we called **`demo_live_provider`** in our example. _**Important:** Copy and paste the following script into your SQL Worksheet; **however, don't run it yet**. Replace the text place holder in the script for the **`oracle_provider_id`** argument with your own **`oracle_provider_id`** value that you obtained in the previous step._ Next, click the **Run Script** icon.
```
<copy>
BEGIN
dbms_share.create_oracle_share_provider
(oracle_provider_id=> 'Enter the provider id here',
provider_name=> 'DEMO_LIVE_PROVIDER');
END;
/
</copy>
```
![Create provider](images/create-provider.png)
3. Query the available providers to confirm the creation of the new share provider name.
```
<copy>
SELECT provider_name share_provider_name
FROM user_share_providers
ORDER BY 1;
</copy>
```
![Verify provider](images/verify-provider.png)
4. Query the available shares from the newly created share provider. Copy and paste the following script into your SQL Worksheet, and then click the **Run Script** icon.
```
<copy>
SELECT available_share_name share_name
FROM dbms_share.discover_available_shares('DEMO_LIVE_PROVIDER');
</copy>
```
![Query available shares](images/query-shares.png)
5. Query the available tables in the share. Copy and paste the following script into your SQL Worksheet, and then click the **Run Statement** icon.
```
<copy>
SELECT schema_name, table_name
FROM dbms_share.discover_available_tables(
share_provider=>'DEMO_LIVE_PROVIDER',
share_name=>'DEMO_LIVE_SHARE')
ORDER BY 1, 2;
</copy>
```
![Query available tables in the share](images/query-tables.png)
## Task 4: Create a Share Link and a View Using the Data Share Table
1. Create a new share link to subscribe to a data share from a registered share provider. Copy and paste the following query into your SQL Worksheet, and then click the **Run Script** icon.
```
<copy>
BEGIN
dbms_share.create_share_link
(
share_link_name => 'SALES_DATA',
share_provider => 'DEMO_LIVE_PROVIDER',
share_name => 'DEMO_LIVE_SHARE'
);
END;
/
</copy>
```
![Create a share link.](images/create-share-link.png)
2. Verify the share link. Copy and paste the following query into your SQL Worksheet, and then click the **Run Statement** icon.
```
<copy>
SELECT share_provider_name, link_name, share_name
FROM user_share_links
ORDER BY 1, 2;
</copy>
```
![Verify the share link](images/verify-share-link.png)
2. Use the new share link to create a view over the shared table. Copy and paste the following query into your SQL Worksheet, and then click the **Run Script** icon.
```
<copy>
BEGIN
dbms_share.create_share_link_view(
view_name=>'CUSTSALES_SHARE_V',
share_link_name=>'SALES_DATA',
share_schema_name=>'share_provider',
share_table_name=>'CUSTSALES');
END;
</copy>
```
![Create a view.](images/create-view.png)
3. Describe the view.
```
<copy>
SELECT dbms_metadata.get_ddl('VIEW', 'CUSTSALES_SHARE_V') view_definition
FROM dual;
</copy>
```
![Describe the view.](images/describe-view.png)
4. Query the view. Copy and paste the following query into your SQL Worksheet, and then click the **Run Statement** icon.
```
<copy>
SELECT app, count(*)
FROM custsales_share_v
GROUP BY app
ORDER BY 1;
</copy>
```
![Query the view.](images/query-view.png)
You may now proceed to the next lab.
## Learn More
* [Oracle Cloud Infrastructure Documentation](https://docs.cloud.oracle.com/en-us/iaas/Content/GSG/Concepts/baremetalintro.htm)
* [Using Oracle Autonomous Database Serverless](https://docs.oracle.com/en/cloud/paas/autonomous-database/adbsa/index.html)
## Acknowledgements
* **Author:** Lauran K. Serhal, Consulting User Assistance Developer
* **Contributor:** Alexey Filanovskiy, Senior Principal Product Manager
* **Last Updated By/Date:** Lauran K. Serhal, January 2024
Data about movies in this workshop were sourced from Wikipedia.
Copyright (C) Oracle Corporation.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3
or any later version published by the Free Software Foundation;
with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
A copy of the license is included in the section entitled [GNU Free Documentation License](files/gnu-free-documentation-license.txt)
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.
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.
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.
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.
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 aa0cf8a

Please sign in to comment.