diff --git a/shared/workshops/adb-datastudio/apex-av-sample-app/add-av-queries-to-dashboard/add-av-queries-to-dashboard.md b/shared/workshops/adb-datastudio/apex-av-sample-app/add-av-queries-to-dashboard/add-av-queries-to-dashboard.md index d98361f8..0ee67d1a 100644 --- a/shared/workshops/adb-datastudio/apex-av-sample-app/add-av-queries-to-dashboard/add-av-queries-to-dashboard.md +++ b/shared/workshops/adb-datastudio/apex-av-sample-app/add-av-queries-to-dashboard/add-av-queries-to-dashboard.md @@ -2,40 +2,36 @@ ## Introduction -Every APEX region needs a data source. You will add queries that select from your analytic view as the data source for each chart. You will configure your charts as: +Each APEX region needs a data source. In this lab, you’ll connect each chart to a SQL query that selects from the analytic view. You’ll configure four charts: -- Sales by time. -- Sales change from prior period by time -- Sales percent change from same period one year ago by geography. -- Sales share of search genre. +- Sales by time +- Sales change from prior period +- Sales percent change year-over-year by geography +- Sales share of search genre -You will start by creating static graphs. In the next lab you will add interactive data selections. +This lab sets up static charts. Interactivity will be added in the next lab. -Estimated Time: 20 minutes. +**Estimated Time:** 20 minutes ### Objectives -In this lab, you will: +- Use simple query templates from the analytic view as data sources in APEX charts -- Learn how simple query templates that select from the analytic view make it very easy to provide data sources to APEX regions. - -### Prerequisites: +### Prerequisites - Complete the previous lab. ## Task 1 - Provide a Data Source to the Sales Chart -In this task, you will add a SQL Query as the Source to the Sales by Time chart. - -1. Select the **Sales Dashboard** page in the APEX App Builder. -1. Select the **Sales** chart. -1. For the chart's **Source** choose: -- **Location: Local Database** -- **Type: SQL Query** -- Enter the following **SQL Query**. - -This query selects sales at the Month level. +Connect the **Sales** chart to a query showing sales at the Month level. +1. Open **Sales Dashboard** in APEX App Builder +2. Select the **Sales** chart +3. Set **Source** to: + - Location: `Local Database` + - Type: `SQL Query` + - Query: + ~~~SQL SELECT @@ -55,38 +51,26 @@ ORDER BY ~~~ -Feel free to set any other attributes according to your preferences. - -Next, map the series to the data source. - -4. Select **Series 1** within this chart. -4. For the series **Source** choose **Location: Region Source**. -4. Set Column Mappings -- Label: **TIME** -- Value: **SALES** - -To ensure that all time periods will be displayed: - -7. In the **Performance** section set the **Maximum Rows to Process** to **1000**. +4. Configure **Series 1**: + - Source: `Region Source` + - Label: `TIME` + - Value: `SALES` -View the result: - -8. **Run** the page. +5. In **Performance**, set **Maximum Rows to Process** to `1000` +6. Click **Run** to view the chart ![Sales Chart](images/sales-chart.png) ## Task 2 - Provide a Data Source to the Sales Change Prior Period Chart -In this task, you will add a SQL Query as the Source to the Sales by Time chart. - -1. Select the **Sales Dashboard** page in the APEX App Builder. -1. Select the **Sales Change Prior Period** chart. -1. For the chart's **Source** choose: -- **Location: Local Database** -- **Type: SQL Query** -- Enter the following **SQL Query**. +Connect the **Sales Change Prior Period** chart using a calculated measure at the Month level. -This query selects sales change from the prior period at the Month level. This query uses the USING form of the FROM clause and includes a calculated measure. +1. Open **Sales Dashboard** +2. Select the **Sales Change Prior Period** chart +3. Set **Source** to: + - Location: `Local Database` + - Type: `SQL Query` + - Query: ~~~SQL @@ -110,38 +94,26 @@ ORDER BY ~~~ -Feel free to set any other attributes according to your preferences. - -Next, map the series to the data source. - -4. Select **Series 1** within this chart. -4. For the series **Source** choose **Location: Region Source**. -4. Set Column Mappings -- Label: **TIME** -- Value: **SALES\_CHG\_PRIOR_PERIOD** - -To ensure that all time periods will be displayed: - -7. In the **Performance** section set the **Maximum Rows to Process** to **1000**. - -View the result: +4. Configure **Series 1**: + - Source: `Region Source` + - Label: `TIME` + - Value: `SALES_CHG_PRIOR_PERIOD` -8. **Run** the page. +5. Set **Maximum Rows to Process** to `1000` +6. Click **Run** to view the chart ![Sales Change Prior Chart](images/sales-change-prior-period-chart.png) ## Task 3 - Provide a Data Source to the Sales Percent Change Year Ago Chart -In this task, you will add a SQL Query as the Source to the Sales by Time chart. +Use a query with percent change compared to the same period last year, grouped by continent. -1. Select the **Sales Dashboard** page in the APEX App Builder. -1. Select the **Sales Percent Change Year Ago** chart. -1. For the chart's **Source** choose: -- **Location: Local Database** -- **Type: SQL Query** -- Enter the following **SQL Query**. - -This query selects percent change in sales from the same period one year ago at the continent level. This query uses the USING form of the FROM clause and includes a calculated measure. +1. Open **Sales Dashboard** +2. Select the **Sales Percent Change Year Ago** chart +3. Set **Source** to: + - Location: `Local Database` + - Type: `SQL Query` + - Query: ~~~SQL @@ -169,45 +141,29 @@ ORDER BY ~~~ -Feel free to set any other attributes according to your preferences. - -Next, map the series to the data source. - -4. Select **Series 1** within this chart. -4. For the series **Source** choose **Location: Region Source**. -4. Set Column Mappings. -- Label: **GEGRAPHY** -- Value: **SALES\_PCT\_CHG\_YEAR\_AGO** - -To ensure that all time periods will be displayed: - -7. In the **Performance** section set the **Maximum Rows to Process** to **1000**. - -Format the y-axis. - -8. Select **y** axis. -8. In **Value** section, set: -- **Format** to **Decimal**. -- **Decimal Places** to **2**. +4. Configure **Series 1**: + - Source: `Region Source` + - Label: `GEOGRAPHY` + - Value: `SALES_PCT_CHG_YEAR_AGO` -View the result: - -10. **Run** the page. +5. Set **Maximum Rows to Process** to `1000` +6. Configure the **y-axis**: + - Format: `Decimal` + - Decimal Places: `2` +7. Click **Run** to view the chart ![Sales Percent Change Year Ago](images/sales-percent-change-year-ago.png) ## Task 4 - Provide a Data Source to the Sales Share of Genre Chart -In this task, you will add a SQL Query as the Source to the Sales Share of Genre chart. - -1. Select the **Sales Dashboard** page in the APEX App Builder. -1. Select the **Sales Share of Genre** chart. -1. For the chart's **Source** choose: -- **Location: Local Database** -- **Type: SQL Query** -- Enter the following **SQL Query**. +This chart displays each genre’s share of total sales in 2023. -Sales Share of Genre is the ratio of sales for the current genre to the sales of all genre. This query selects sales share of genre for year 2023. +1. Open **Sales Dashboard** +2. Select the **Sales Share of Genre** chart +3. Set **Source** to: + - Location: `Local Database` + - Type: `SQL Query` + - Query: ~~~SQL @@ -234,46 +190,31 @@ ORDER BY sales_share_genre; ~~~ -Feel free to set any other attributes according to your preferences. - -Next, map the series to the data source. - -4. Select **Series 1** within this chart. -4. For the series **Source** choose **Location: Region Source**. -4. Set Column Mappings -- Label: **GENRE** -- Value: **SALES\_SHARE\_GENRE** - -Format the y-axis. - -7. Select **y** axis. -7. In **Value** section, set: -- **Format** to **Decimal**. -- **Decimal Places** to **2**. - -View the result: +4. Configure **Series 1**: + - Source: `Region Source` + - Label: `GENRE` + - Value: `SALES_SHARE_GENRE` -9. **Run** the page. +5. Configure the **y-axis**: + - Format: `Decimal` + - Decimal Places: `2` +6. Click **Run** to view the chart ![Sales Share of Genre](images/sales-share-of-genre.png) ## Summary -In this lab you created four charts and in interactive grid. The query for each chart and the report selects from the analytic view using the same query template, with calculated measures added using the ADD MEASURES clause. +You created four charts and configured each to use a SQL query that selects from an analytic view. Each query reused a shared pattern, with calculated measures added using `ADD MEASURES`. You may now **proceed to the next lab**. ## Acknowledgements -- Created By/Date - William (Bud) Endress, Product Manager, Autonomous Database, June 2023 -- Last Updated By - William (Bud) Endress, May 2024 +- **Created By** - William (Bud) Endress, Product Manager, Autonomous Database, June 2023 +- **Last Updated By** - William (Bud) Endress, June 2025 Data about movies in this workshop were sourced from **Wikipedia**. -Copyright (C) Oracle Corporation. +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) \ No newline at end of file +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) diff --git a/shared/workshops/adb-datastudio/apex-av-sample-app/add-data-selectors-to-sales-dashboard/add-data-selectors-to-sales-dashboard.md b/shared/workshops/adb-datastudio/apex-av-sample-app/add-data-selectors-to-sales-dashboard/add-data-selectors-to-sales-dashboard.md index 61fcbba3..65760655 100644 --- a/shared/workshops/adb-datastudio/apex-av-sample-app/add-data-selectors-to-sales-dashboard/add-data-selectors-to-sales-dashboard.md +++ b/shared/workshops/adb-datastudio/apex-av-sample-app/add-data-selectors-to-sales-dashboard/add-data-selectors-to-sales-dashboard.md @@ -2,36 +2,33 @@ ## Introduction -In this lab, you will add data selectors to the Sales Dashboard and update the queries to use the selections. +In this lab, you’ll add interactive selectors to your Sales Dashboard. These selectors allow users to filter data by time period and geography. -Estimated Time: 20 minutes. +**Estimated Time:** 20 minutes ### Objectives -In this lab, you will learn how to: +- Create select lists using SQL queries on analytic views and dictionary metadata +- Modify chart queries to use selector values -- Create select lists using queries select from the data dictionary and hierarchies. -- Implement user selections with queries selecting from the analytic view. - -### Prerequisites: +### Prerequisites - Complete the previous lab. ## Task 1 - Add Time Level Selector -The Sales and Sales Change Year Ago charts use static selections, selecting Month level data. - -In this task, you will add a Popup LOV that allows the user to select time periods by choosing the values of the analytic view's TIME hierarchy. +The Sales and Sales Change Prior Period charts currently use static time levels. You’ll add a **Popup LOV** to let users choose a time level dynamically. -1. Add a **Popup LOV** item to the page as shown in the illustration below. -1. **Name** the item **P1\_TIME\_LEVEL**. -1. The **Label** should default to **Time Level**. -1. In the **Layout** section, set **Column Span** to **3**. +1. Add a **Popup LOV** to the page +2. Set **Name** to `P1_TIME_LEVEL` +3. Label: `Time Level` +4. Under **Layout**, set **Column Span** to `3` ![P1_TIME_LEVEL item](images/p1-time-level-position.png) -5. In **List of Values** choose **SQL Query**. -5. Replace the **SQL Query** with the following query. Note that this query selects from a data dictionary view. All analytic view metadata is available in data dictionary views. This view will return the levels of the TIME hierarchy. +5. In **List of Values**, choose: + - Type: `SQL Query` + - SQL: ~~~SQL @@ -47,41 +44,36 @@ ORDER BY ~~~ -7. In the **Settings** section set **Display Extra Values** to **off**. -7. Set **Display Null Value** to **off**. -7. In the **Default** section set: -- **Type**: **Static** -- **Static Value**: -~~~SQL - -MONTH - -~~~ +6. In **Settings**: + - Display Extra Values: `Off` + - Display Null Value: `Off` -A dynamic action will submit and refresh the page. +7. In **Default**: + - Type: `Static` + - Static Value: `MONTH` -1. Select the **P1\_TIME\_LEVEL** item. -1. Create a dynamic action. -1. Accept **Change** as the default event. -1. Set the **True** action to **Submit Page** +8. Add a **Dynamic Action**: + - Event: `Change` + - True Action: `Submit Page` -Feel free to run the page and test the Time Level selector. It's not hooked up to the query, so it will not yet affect the charts. +You can now test the control. It won’t affect charts yet — that comes next. -## Task 2 - Add a Geography Member Selector +## Task 2 - Add Geography Member Selector -In this task, you will add a Popup LOV that allows the user to choose a Geography hierarchy member. +Add a **Popup LOV** that allows selection of a geography member from the hierarchy. -1. Add a **Popup LOV** item to the page as shown in the illustration below. -1. **Name** the item **P1_GEOGRAPHY**. -1. The **Label** should default to **Geography**. -1. If the **P1_GEOGRAPHY** is correctly positioned, **Start New Row** and **New Column** will be **off** in the **Settings** section. If not, try to reposition it but do not worry it is not perfect. +1. Add a **Popup LOV** +2. Set **Name** to `P1_GEOGRAPHY` +3. Label: `Geography` +4. Ensure **Start New Row** and **New Column** are `Off` ![P1_GEOGRAPHY item](images/p1-geography-position.png) -5. In the **List of Values** section, choose **Type: SQL Query**. -5. Enter the following **SQL Query**. +5. Set **List of Values**: + - Type: `SQL Query` + - SQL: -~~~ +~~~SQL SELECT member_name d @@ -89,40 +81,31 @@ SELECT FROM geography WHERE - level_name IN ('ALL', 'CONTINENT', 'COUNTRY' ) + level_name IN ('ALL', 'CONTINENT', 'COUNTRY') ORDER BY hier_order; ~~~ -The query selects the hierarchy member-friendly name (MEMBER\_NAME) and primary key value (MEMBER\_UNIQUE\_NAME) at the ALL, CONTINENT, and COUNTRY levels. This query can be used with any hierarchy. +6. In **Settings**: + - Display Extra Values: `Off` + - Display Null Value: `Off` -7. In the **Settings** section set **Display Extra Values** to **off**. -7. Set **Display Null Value** to **off**. -7. In the **Default** section set: -- **Type**: **Static** -- **Static Value**: -~~~ - -[ALL].[ALL] - -~~~ -Note: **[ALL].[ALL]** is the key value (MEMBER\_UNIQUE\_NAME) of the grand total hierarchy member. - -A dynamic action will submit and refresh the page. +7. In **Default**: + - Type: `Static` + - Static Value: `[ALL].[ALL]` -1. Select the **P1\_GEOGRAPHY\_MEMBER** item. -1. Create a dynamic action. -1. Accept **Change** as the default event. -1. Set the True action to **Submit Page** +8. Add a **Dynamic Action**: + - Event: `Change` + - True Action: `Submit Page` -Feel free to run the page and test the Geography selector. It's not hooked up to the query, so it will not yet affect the charts. +Now test the Geography selector. It will become active in the next step. ## Task 3 - Update the Sales Chart Query -Update the query used by the Sales chart to use the Time Level and Geography selectors. The query will select time periods at the chosen level and the chosen Geography value. Note that this query follows the familiar SELECT ... FROM ... WHERE pattern. Joins and GROUP BY are replaced by the HIERARCHIES clause. +Update the chart to use the selector values. -1. Replace the SQL Query used by the Sales chart with the following query: +1. Edit the Sales chart query: ~~~SQL @@ -145,13 +128,13 @@ ORDER BY ~~~ -Feel free to run the page and test the chart. The selectors will now be active for this chart. +Run the page — the chart now reflects user selections. ## Task 4 - Update the Sales Change Prior Period Chart Query -The query to the Sales Change Prior Period chart will also use the Time Level and Geography selections. Note that this query following the same pattern as the previous pattern, but uses the USING form of FROM and ADD MEASURES. +Update this chart to use both selectors and a calculated measure. -1. Replace the SQL Query used by the Sales Change Prior Period chart with the following query: +1. Edit the Sales Change Prior Period chart query: ~~~SQL @@ -177,13 +160,13 @@ ORDER BY ~~~ -Feel free to run the page and test the chart. The selectors will now be active for this chart. +Test the chart. It now uses the time level and geography selected by the user. ## Task 5 - Update the Sales Percent Change Year Ago Chart Query -The query to the Sales Percent Change Year Ago chart will use the Geography selection to select the children of the selected value. Again, the same query pattern is used. The filter uses the PARENT\_UNIQUE\_NAME column which will result in the query returning the children of the parent hierarchy member. +Update this chart to return child values based on the selected geography. -1. Replace the SQL Query used by the Update the Sales Percent Change Year Ago chart with the following query: +1. Replace the chart query with: ~~~SQL @@ -211,13 +194,13 @@ ORDER BY ~~~ -Feel free to run the page and test the chart. The Geography selector will now be active for this chart. +Run the page and confirm the Geography selector now filters this chart. ## Task 6 - Update the Sales Share of Genre Query -The query to the Sales Share of Genre chart will also use the Geography selection. The geography value is used to select the children of the selected geography. This query includes a SHARE calculation. SHARE calculations return the ration of the current member to another member, in this case the ALL member (that is, the grand total). +Add geography filtering to this chart, and include a `SHARE_OF` calculation. -1. Replace the SQL Query used by the Sales Share of Genre chart with the following query: +1. Replace the query with: ~~~SQL @@ -246,37 +229,41 @@ ORDER BY sales_share_genre; ~~~ -**Run the page and test the chart.** The Geography selector will now be active for this chart. +Run the page and test the updated chart. ## Notes About the Queries -The charts now allow interactive selections of the time periods. If the queries select from tables, all the column names used in the query would need to change. With the analytic view queries, the only thing that changed was the value of the level filter. The reuse of the query template simplifies SQL generation in APEX applications. +Your charts now support user-driven filtering by time and geography. + +With analytic views: +- No joins or GROUP BY needed +- Column names stay consistent +- Only level or hierarchy filters change +- Reusable query templates simplify development -The completed Sales Dashboard will look like this. +The final Sales Dashboard should resemble this: ![Completed Sales Dashboard](images/completed-sales_dashboard.png) ## Summary -In this lab, your updated charts allow users to change time periods and geographies. In upgrading the charts, you should have observed that only minor changes to the query templates were required. +You added selectors and updated queries to create a fully interactive Sales Dashboard. Only small changes to the queries were required — analytic views handled the complexity behind the scenes. -This Live Lab introduced you to creating an APEX application using an analytic view. The analytic view simplifies SQL generation in APEX application by providing a a foundation that replaces complex collections of tables with single view that eliminates the need for joins, aggregation (GROUP BY), returns rows at detail and aggregate values using a consistent set of columns, includes helpful hierarchical attributes, and provides unique calculation expressions. +Analytic views make it easy to build flexible APEX apps by: -Each analytic view includes the same set of hierarchical attribute columns, making it easy to transfer knowledge and code from one application and analytic view to the next. Most SQL generation can be accomplished using simple, reusable query templates. +- Replacing joins and GROUP BY with HIERARCHIES +- Supporting consistent, reusable SQL +- Providing calculated measures and hierarchy-aware filtering You may now **proceed to the next lab**. ## Acknowledgements -- Created By/Date - William (Bud) Endress, Product Manager, Autonomous Database, June 2023 -- Last Updated By - William (Bud) Endress, May 2024 +- **Created By** - William (Bud) Endress, Product Manager, Autonomous Database, June 2023 +- **Last Updated By** - William (Bud) Endress, June 2025 Data about movies in this workshop were sourced from **Wikipedia**. -Copyright (C) Oracle Corporation. +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) \ No newline at end of file +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) \ No newline at end of file diff --git a/shared/workshops/adb-datastudio/apex-av-sample-app/analytic-queries-av/analytic-queries-av.md b/shared/workshops/adb-datastudio/apex-av-sample-app/analytic-queries-av/analytic-queries-av.md index ec772fcf..4649f8ea 100644 --- a/shared/workshops/adb-datastudio/apex-av-sample-app/analytic-queries-av/analytic-queries-av.md +++ b/shared/workshops/adb-datastudio/apex-av-sample-app/analytic-queries-av/analytic-queries-av.md @@ -1,36 +1,30 @@ # Examine Queries that Select from the Analytic View - ## Introduction -In Lab 7, you ran several queries that selected data from tables. In this lab, you will run queries that select data from the analytic view, returning the same data as the queries in lab 7. - -You will observe that each of the queries selecting from the analytic view follows the same pattern, using the same column name regardless of the levels of aggregation. +In Lab 7, you ran queries against tables. In this lab, you’ll run similar queries against an analytic view — returning the same data with simpler, more flexible SQL. -Estimated Time: 5 minutes. +**Estimated Time:** 5 minutes ### Objectives -In this lab, you will observe how queries selecting from an analytic view: - -- Use hierarchical columns. -- Aggregate data. -- Add calculated measures to queries. -- Compare to queries that select from tables. +- Use hierarchical columns +- Aggregate data +- Add calculated measures +- Compare to table-based queries -### Prerequisites: +### Prerequisites - Complete the previous lab. ## Task 1 - Aggregate Data to Year, Continent, and Search Genre -Queries that select from analytic views follow the typical SELECT ... FROM ... WHERE ... ORDER BY pattern. In a query that selects from an analytic view, the HIERARCHIES clause replaces joins and GROUP BY. +Queries against analytic views follow the standard `SELECT ... FROM ... WHERE ... ORDER BY` pattern. +Instead of `JOIN` and `GROUP BY`, use the `HIERARCHIES` clause. -Note that hierarchy columns are qualified with the hierarchy name. For example, TIME.MEMBER_NAME. - -Filtering on the LEVEL\_NAME column is a simple method of requesting data at specific levels of aggregation. Selecting the MEMBER\_NAME columns eliminates the need to change column names when selecting data at different levels of aggregation. - -This query returns data from the Year, Continent, and Search Genre levels. +- Use `LEVEL_NAME` to select levels of aggregation +- Use `MEMBER_NAME` for display values +- Use `HIER_ORDER` for proper hierarchical sorting ~~~SQL @@ -56,13 +50,13 @@ ORDER BY time.hier_order , geography.hier_order , search_genre.hier_order; - ~~~ ## Task 2 - Aggregate Data to Quarter, Country, and Search Genre -The following query selects quarter, country, and search genre level data. The only changes required to the query are the LEVEL\_NAME values. Using the hierarchical columns (MEMBER\_NAME, LEVEL\_NAME, and HIER\_ORDER) allows the query to be reusable across different levels of aggregation with only minor changes. In an APEX application, you would pass the level values into the query as bind variables from an APEX item such as a list box. +To change the aggregation levels, update the `LEVEL_NAME` values. +No need to rewrite the entire query — it’s the same pattern. ~~~SQL @@ -88,10 +82,11 @@ ORDER BY time.hier_order , geography.hier_order , search_genre.hier_order; - + ~~~ -The query same query template can return data at multiple levels of aggregation. In this example, YEAR and QUARTER. Once again, notice that the same query template is used. +This query returns both Year and Quarter level data. +Same structure, just adjusted filters. ~~~SQL @@ -105,7 +100,7 @@ SELECT , quantity FROM movie_sales_av HIERARCHIES ( - time + time , geography , search_genre ) @@ -117,14 +112,20 @@ ORDER BY time.hier_order , geography.hier_order , search_genre.hier_order; - - ~~~ + +~~~ ## Task 3 - Prior Period Queries -Calculations can be defined as part of the analytic view or be expressed dynamically in queries that select from an analytic view. Calculation expressions can use analytic view expressions, SQL single-row functions, or reference PL/SQL functions. Analytic view expressions reference elements of the analytic view, such as hierarchies and levels. Because calculation expressions do not usually reference column names, they do not need to be changed as hierarchies are added or removed from the query or levels of aggregation change. +You can define calculations inside the analytic view or dynamically in the query using the `ADD MEASURES` clause. + +Dynamic calculations use: + +- Analytic view expressions (e.g., `LAG_DIFF`, `LAG_DIFF_PERCENT`) +- No need to reference table column names +- Fully reusable as levels or hierarchies change -A query with a dynamic calculated measure expression uses the USING form of the FROM clause. The next query uses the USING form of the FROM clause and the ADD MEASURE clause to include a calculation expression. The ability to express calculations in the query provides the APEX developer with many opportunities to enhance applications. +Use the `USING` form of the `FROM` clause for dynamic expressions. ~~~SQL @@ -158,7 +159,7 @@ ORDER BY ~~~ -This query template is reused to query data at the Year and Quarter levels and adds the Sales Change from Prior Prior measure. +This version includes both change and percent change measures: ~~~SQL @@ -196,26 +197,22 @@ ORDER BY ## Summary -Let's summarize some of the advantages of using analytic views in APEX. +**Why use analytic views in APEX?** -- The physical implementation is hidden from the application. The physical model can change without affecting the application querying the analytic view. -- Joins and GROUP BY are not needed. -- Calculations are easily added to queries. -- Queries are easily generated from reusable templates. +- Abstracts physical data model +- No need for joins or GROUP BY +- Simplifies complex calculations +- Enables reusable query templates -You may now **proceed to the next lab** and start applying this knowledge to APEX! +You may now **proceed to the next lab** and apply what you’ve learned! ## Acknowledgements -- Created By/Date - William (Bud) Endress, Product Manager, Autonomous Database, June 2023 -- Last Updated By - William (Bud) Endress, May 2024 +- **Created By** - William (Bud) Endress, Product Manager, Autonomous Database, June 2023 +- **Last Updated By** - William (Bud) Endress, June 2025 Data about movies in this workshop were sourced from **Wikipedia**. -Copyright (C) Oracle Corporation. +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) \ No newline at end of file +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) \ No newline at end of file diff --git a/shared/workshops/adb-datastudio/apex-av-sample-app/analytic-queries/analytic-queries.md b/shared/workshops/adb-datastudio/apex-av-sample-app/analytic-queries/analytic-queries.md index 0c2326e5..c941f784 100644 --- a/shared/workshops/adb-datastudio/apex-av-sample-app/analytic-queries/analytic-queries.md +++ b/shared/workshops/adb-datastudio/apex-av-sample-app/analytic-queries/analytic-queries.md @@ -1,25 +1,22 @@ # Examine Analytic Queries that Select from Tables - ## Introduction -As an Oracle APEX developer, writing or generating the SQL used by reports, charts, and other items and regions is your job. SQL for a simple report or chart is relatively easy. But what about SQL for building an interactive, analytic application? That is much more difficult. Let's take a look. +As an Oracle APEX developer, you're responsible for writing or generating the SQL behind reports, charts, and other UI components. SQL for basic reports is straightforward — but building interactive, analytic applications is far more complex. Let’s explore why. -Estimated Time: 5 minutes. +**Estimated Time:** 5 minutes ### Objectives -In this lab, you will: - -- Examine and run queries that aggregate data and include analytic expressions. +- Examine and run queries that aggregate data and use analytic expressions. -### Prerequisites: +### Prerequisites - Complete the previous lab. ## Task 1 - Aggregate Data to Year, Continent, and Search Genre -If you have been building reports and charts in APEX, it is almost certain that you have written queries like this to aggregate data. You proabably used APEX items to parameterize filters, as shown in the commented line. +If you’ve built reports or charts in APEX, you’ve likely written queries like this. Filters are often parameterized using APEX items (e.g., `:P1_GENRE_NAME`). ~~~SQL @@ -55,7 +52,7 @@ ORDER BY ## Task 2 - Aggregate Data to Quarter, Country, and Search Genre -To change the report to query different levels of aggregation, you need to provide a new query. While the query follows the same pattern, most columns have changed. To allow the user to select the levels of aggregation interactively, the query would need to be generated by a PL/SQL function. The difficulty level has increased significantly by offering this interactivity in the application. +To change aggregation levels, a new query is required. Although the structure is similar, most columns change. Supporting user-selected levels interactively requires dynamic SQL or PL/SQL, increasing the complexity significantly. ~~~SQL @@ -86,18 +83,18 @@ ORDER BY t.quarter , c.country , sg.genre_name; - - ~~~ + +~~~ ## Task 3 - Prior Period Queries -Consider a percent change in sales from prior period calculation as an example of an analytic query. The query runs in three passes: +Calculating percent change from a prior period is a common analytic requirement. This query runs in three steps: -1. Aggregate sales to the required levels. -1. Calculate the lag (prior period) of sales. -1. Calculate the percent change in sales. +1. Aggregate sales to the desired levels. +2. Use `LAG()` to fetch prior period values. +3. Compute the percent change. -In the second pass, we must carefully account for the possibility of no sales in the prior period, requiring a partitioned outer join on time. +A partitioned outer join is used to handle missing prior periods. ~~~SQL @@ -162,22 +159,19 @@ FROM ~~~ -As an APEX developer, this query is yours to write or generate. That can be a tremendous amount of work. +As an APEX developer, writing or generating this type of SQL can be time-consuming and complex. + There must be a better way! -You may now **proceed to the next lab** +You may now **proceed to the next lab**. ## Acknowledgements -- Created By/Date - William (Bud) Endress, Product Manager, Autonomous Database, June 2023 -- Last Updated By - William (Bud) Endress, May 2024 +- **Created By** - William (Bud) Endress, Product Manager, Autonomous Database, June 2023 +- **Last Updated By** - William (Bud) Endress, June 2025 Data about movies in this workshop were sourced from **Wikipedia**. -Copyright (C) Oracle Corporation. +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) \ No newline at end of file +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) diff --git a/shared/workshops/adb-datastudio/apex-av-sample-app/create-analytic-view/create-analytic-view.md b/shared/workshops/adb-datastudio/apex-av-sample-app/create-analytic-view/create-analytic-view.md index 084255bb..f911451b 100644 --- a/shared/workshops/adb-datastudio/apex-av-sample-app/create-analytic-view/create-analytic-view.md +++ b/shared/workshops/adb-datastudio/apex-av-sample-app/create-analytic-view/create-analytic-view.md @@ -2,184 +2,179 @@ ## Introduction -This lab uses three hierarchy views and an analytic view that reference the tables created in the previous lab. You will create these objects using a script. +This lab creates attribute dimensions, hierarchies, and an analytic view based on tables from the previous lab. -This analytic view could be created using the Database Actions Data Studio Analysis tool. To learn how, see the [Get Started With Analytic Views using Data Studio](https://livelabs.oracle.com/pls/apex/dbpm/r/livelabs/view-workshop?wid=3594) Live Lab. +You can also create the analytic view using the **Database Actions – Data Studio Analysis** tool. +See the [Get Started With Analytic Views using Data Studio](https://livelabs.oracle.com/pls/apex/dbpm/r/livelabs/view-workshop?wid=3594) Live Lab. -Estimated Time: 5 minutes. +**Estimated Time:** 5 minutes ### Objectives -In this lab, you will: +- Create attribute dimensions +- Create hierarchies +- Create an analytic view -- Create attribute dimensions, hierarchies, and an analytic view. +### Prerequisites -### Prerequisites: +- Complete the previous lab -- Complete the previous lab. +## Task 1 - Create the Analytic View objects -## Task 1 - Create the Analytic View objects. - -To create the analytic view objects used in this lab. - -1. Using SQL Worksheet, connect to the database using the **MOVIESTREAM** (or other) user created in Lab 3. -2. Run the following commands in SQL Worksheet. They can be run all at once as a script or individually, as you prefer. +1. Open SQL Worksheet and connect using the **MOVIESTREAM** user (or user from Lab 3). +2. Run the following script: ~~~SQL - CREATE OR REPLACE ATTRIBUTE DIMENSION time_ad - USING time_dim ATTRIBUTES ( - year - , quarter - , month - , day_id) - LEVEL year - CLASSIFICATION CAPTION VALUE 'Year' - KEY (year) - MEMBER NAME year - MEMBER CAPTION year - MEMBER DESCRIPTION year - LEVEL quarter - CLASSIFICATION CAPTION VALUE 'Quarter' - KEY (quarter) - MEMBER NAME quarter - MEMBER CAPTION quarter - MEMBER DESCRIPTION quarter - DETERMINES (year) - LEVEL month - CLASSIFICATION CAPTION VALUE 'Month' - KEY (month) - MEMBER NAME month - MEMBER CAPTION month - MEMBER DESCRIPTION month - DETERMINES (quarter) - LEVEL day - CLASSIFICATION CAPTION VALUE 'Day' - KEY (day_id) - MEMBER NAME TO_CHAR(day_id) - MEMBER CAPTION TO_CHAR(day_id) - MEMBER DESCRIPTION TO_CHAR(day_id) - DETERMINES (month); +CREATE OR REPLACE ATTRIBUTE DIMENSION time_ad + USING time_dim + ATTRIBUTES ( + year, + quarter, + month, + day_id) + LEVEL year + CLASSIFICATION CAPTION VALUE 'Year' + KEY (year) + MEMBER NAME year + MEMBER CAPTION year + MEMBER DESCRIPTION year + LEVEL quarter + CLASSIFICATION CAPTION VALUE 'Quarter' + KEY (quarter) + MEMBER NAME quarter + MEMBER CAPTION quarter + MEMBER DESCRIPTION quarter + DETERMINES (year) + LEVEL month + CLASSIFICATION CAPTION VALUE 'Month' + KEY (month) + MEMBER NAME month + MEMBER CAPTION month + MEMBER DESCRIPTION month + DETERMINES (quarter) + LEVEL day + CLASSIFICATION CAPTION VALUE 'Day' + KEY (day_id) + MEMBER NAME TO_CHAR(day_id) + MEMBER CAPTION TO_CHAR(day_id) + MEMBER DESCRIPTION TO_CHAR(day_id) + DETERMINES (month); CREATE OR REPLACE HIERARCHY time - USING time_ad ( - day CHILD OF - month CHILD OF - quarter CHILD OF - year); + USING time_ad ( + day CHILD OF + month CHILD OF + quarter CHILD OF + year); CREATE OR REPLACE ATTRIBUTE DIMENSION geography_ad - USING customer_dim - ATTRIBUTES ( - continent - , country - , state_province - , city - , customer_id) - LEVEL continent - KEY (continent) - LEVEL country - KEY (country) - DETERMINES (continent) - LEVEL state_province - KEY (state_province) - DETERMINES (country) - LEVEL city - KEY (city) - DETERMINES (state_province) - LEVEL customer_id - KEY (customer_id) - DETERMINES (city); + USING customer_dim + ATTRIBUTES ( + continent, + country, + state_province, + city, + customer_id) + LEVEL continent + KEY (continent) + LEVEL country + KEY (country) + DETERMINES (continent) + LEVEL state_province + KEY (state_province) + DETERMINES (country) + LEVEL city + KEY (city) + DETERMINES (state_province) + LEVEL customer_id + KEY (customer_id) + DETERMINES (city); CREATE OR REPLACE HIERARCHY geography - USING geography_ad ( - customer_id CHILD OF - city CHILD OF - state_province CHILD OF - country CHILD OF - continent); + USING geography_ad ( + customer_id CHILD OF + city CHILD OF + state_province CHILD OF + country CHILD OF + continent); CREATE OR REPLACE ATTRIBUTE DIMENSION search_genre_ad - USING search_genre_dim - ATTRIBUTES ( - genre_id - , genre_name) - LEVEL search_genre - KEY genre_id - MEMBER NAME genre_name - DETERMINES (genre_name); + USING search_genre_dim + ATTRIBUTES ( + genre_id, + genre_name) + LEVEL search_genre + KEY genre_id + MEMBER NAME genre_name + DETERMINES (genre_name); CREATE OR REPLACE HIERARCHY search_genre - USING search_genre_ad ( - search_genre); + USING search_genre_ad ( + search_genre); CREATE OR REPLACE ANALYTIC VIEW movie_sales_av - USING movie_sales_fact - DIMENSION BY ( - time_ad - KEY (day_id) REFERENCES (day_id) SPARSE - HIERARCHIES (TIME DEFAULT), - geography_ad - KEy (cust_id) REFERENCES (CUSTOMER_ID) sparse - HIERARCHIES (GEOGRAPHY DEFAULT), - search_genre_ad - KEY (genre_id) REFERENCES (genre_id) SPARSE - HIERARCHIES (SEARCH_GENRE DEFAULT)) + USING movie_sales_fact + DIMENSION BY ( + time_ad + KEY (day_id) REFERENCES (day_id) SPARSE + HIERARCHIES (TIME DEFAULT), + geography_ad + KEY (cust_id) REFERENCES (CUSTOMER_ID) SPARSE + HIERARCHIES (GEOGRAPHY DEFAULT), + search_genre_ad + KEY (genre_id) REFERENCES (genre_id) SPARSE + HIERARCHIES (SEARCH_GENRE DEFAULT)) MEASURES ( - sales FACT (sales) AGGREGATE BY SUM - , quantity FACT (quantity) AGGREGATE BY SUM - , avg_discount_percent FACT (discount_percent) AGGREGATE BY AVG - , avg_list_price FACT (list_price) AGGREGATE BY AVG) - DEFAULT MEASURE sales; + sales FACT (sales) AGGREGATE BY SUM, + quantity FACT (quantity) AGGREGATE BY SUM, + avg_discount_percent FACT (discount_percent) AGGREGATE BY AVG, + avg_list_price FACT (list_price) AGGREGATE BY AVG) + DEFAULT MEASURE sales; + ~~~ ## Task 2 - View the Analytic View in Database Actions Analysis -You can view the analytic view in the Database Actions Analysis application. +1. Go to the **Data Studio** tab and open the **Data Analysis** application. + ![Open Data Analysis](images/open-data-analysis.png) -1. Return to the Database Actions Launchpad -1. Choose **DATA ANALYSIS** application in the **Data Studio** section. -1. Using the vertical ellipsis (...) choose Analyze. + You may see introductory cards. Review or close them. -![Start Analysis](images/start-analyze.png) +2. Double-click the analytic view to open it. + ![Open Moviestream AV](images/open-moviestream-av.png) -The basic structure of the analytic view is displayed in the tree on the left side. You will see three hierarchies, columns in the hierarchies, and four measures. A report is displayed on the right side. +The left pane shows the analytic view structure — hierarchies, columns, and measures. -![Start Analysis](images/analysis-report.png) +The report pane on the right allows you to move data elements into different positions. -Feel free to experiment with the Analysis application for a few minutes. + ![Analysis Report](images/analysis-report.png) -You can also view the analytic view in the editor. + Explore the application as desired. -1. Return to the Analysis application home screen. -1. Using the virtual ellipsis (...) choose Edit. +### Optional: View in Editor -![Start Analytic View editor](images/start-analysis-edit.png) +1. Select **Edit Analytic View**. + ![Start Analytic View editor](images/start-analysis-edit.png) -Feel free to explore the editor. + Explore the editor if needed. + ![Analytic View editor](images/analysis-edit.png) -![Analytic View editor](images/analysis-edit.png) +2. Click **Cancel** to exit. + **Do not** make changes to the analytic view. - When you are done exploring the editor: - -1. Press the **Cancel** button to exit out. **Do not make changes to the analytic view or press the Update button.** - -You may now **proceed to the next lab** +You may now **proceed to the next lab**. ## Acknowledgements -- Created By/Date - William (Bud) Endress, Product Manager, Autonomous Database, June 2023 -- Last Updated By - William (Bud) Endress, May 2024 - 2023 +- **Created By** - William (Bud) Endress, Product Manager, Autonomous Database, June 2023 +- **Last Updated By** - William (Bud) Endress, June 2025 Data about movies in this workshop were sourced from **Wikipedia**. -Copyright (C) Oracle Corporation. +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) -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) \ No newline at end of file diff --git a/shared/workshops/adb-datastudio/apex-av-sample-app/create-analytic-view/images/analysis-edit.png b/shared/workshops/adb-datastudio/apex-av-sample-app/create-analytic-view/images/analysis-edit.png index 6a1355a1..f4a172f3 100644 Binary files a/shared/workshops/adb-datastudio/apex-av-sample-app/create-analytic-view/images/analysis-edit.png and b/shared/workshops/adb-datastudio/apex-av-sample-app/create-analytic-view/images/analysis-edit.png differ diff --git a/shared/workshops/adb-datastudio/apex-av-sample-app/create-analytic-view/images/analysis-report.png b/shared/workshops/adb-datastudio/apex-av-sample-app/create-analytic-view/images/analysis-report.png index 71c6f162..e98476f6 100644 Binary files a/shared/workshops/adb-datastudio/apex-av-sample-app/create-analytic-view/images/analysis-report.png and b/shared/workshops/adb-datastudio/apex-av-sample-app/create-analytic-view/images/analysis-report.png differ diff --git a/shared/workshops/adb-datastudio/apex-av-sample-app/create-analytic-view/images/open-data-analysis.png b/shared/workshops/adb-datastudio/apex-av-sample-app/create-analytic-view/images/open-data-analysis.png new file mode 100644 index 00000000..0c957592 Binary files /dev/null and b/shared/workshops/adb-datastudio/apex-av-sample-app/create-analytic-view/images/open-data-analysis.png differ diff --git a/shared/workshops/adb-datastudio/apex-av-sample-app/create-analytic-view/images/open-moviestream-av.png b/shared/workshops/adb-datastudio/apex-av-sample-app/create-analytic-view/images/open-moviestream-av.png new file mode 100644 index 00000000..1f591f58 Binary files /dev/null and b/shared/workshops/adb-datastudio/apex-av-sample-app/create-analytic-view/images/open-moviestream-av.png differ diff --git a/shared/workshops/adb-datastudio/apex-av-sample-app/create-analytic-view/images/start-analysis-edit.png b/shared/workshops/adb-datastudio/apex-av-sample-app/create-analytic-view/images/start-analysis-edit.png index 38e9194e..03dc25ee 100644 Binary files a/shared/workshops/adb-datastudio/apex-av-sample-app/create-analytic-view/images/start-analysis-edit.png and b/shared/workshops/adb-datastudio/apex-av-sample-app/create-analytic-view/images/start-analysis-edit.png differ diff --git a/shared/workshops/adb-datastudio/apex-av-sample-app/create-analytic-view/images/start-analyze.png b/shared/workshops/adb-datastudio/apex-av-sample-app/create-analytic-view/images/start-analyze.png deleted file mode 100644 index c4982eea..00000000 Binary files a/shared/workshops/adb-datastudio/apex-av-sample-app/create-analytic-view/images/start-analyze.png and /dev/null differ diff --git a/shared/workshops/adb-datastudio/apex-av-sample-app/create-db-user/create-db-user.md b/shared/workshops/adb-datastudio/apex-av-sample-app/create-db-user/create-db-user.md index 1b71c8e8..bd3bc96b 100644 --- a/shared/workshops/adb-datastudio/apex-av-sample-app/create-db-user/create-db-user.md +++ b/shared/workshops/adb-datastudio/apex-av-sample-app/create-db-user/create-db-user.md @@ -90,15 +90,11 @@ You may now **proceed to the next lab** ## Acknowledgements -- Created By/Date - William (Bud) Endress, Product Manager, Autonomous Database, June 2023 -- Last Updated By - William (Bud) Endress, May 2024 +- **Created By** - William (Bud) Endress, Product Manager, Autonomous Database, June 2023 +- **Last Updated By** - William (Bud) Endress, June 2025 Data about movies in this workshop were sourced from **Wikipedia**. -Copyright (C) Oracle Corporation. +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) +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) diff --git a/shared/workshops/adb-datastudio/apex-av-sample-app/create-new-apex-app/create-new-apex-app.md b/shared/workshops/adb-datastudio/apex-av-sample-app/create-new-apex-app/create-new-apex-app.md index c941b238..25f0193f 100644 --- a/shared/workshops/adb-datastudio/apex-av-sample-app/create-new-apex-app/create-new-apex-app.md +++ b/shared/workshops/adb-datastudio/apex-av-sample-app/create-new-apex-app/create-new-apex-app.md @@ -1,99 +1,95 @@ # Create a New Application - ## Introduction -Now that you know the basics about querying hierarchies and analytic views, it is time to put that knowledge to work. You will now start building a dashboard application that selects from hierarchies and analytic view. This application will allow users to make interactive data selections. Queries will include time series and other calculations using analytic view expressions. +Now that you’ve learned how to query hierarchies and analytic views, it's time to build an APEX dashboard. This app will let users interactively explore data using time series and other calculations powered by analytic view expressions. -The application as shown in this lab will have a certain layout and appearance. It is not important that your application look exactly like this sample application. As an APEX developer, you know that APEX makes it very easy to change the layout and appearance of an application. What is important is that you learn how items and regions can use analytic views. +The sample layout shown in this lab is just a reference. APEX makes it easy to customize appearance and layout. What matters is understanding how APEX items and regions work with analytic views. -Estimated Time: 10 minutes. +**Estimated Time:** 10 minutes ### Objectives -In this lab, you will: - -- Create new APEX application. -- Add a dashboard page to the application. +- Create a new APEX application +- Add a dashboard page -### Prerequisites: +### Prerequisites - Complete the previous lab. -## Task 1 - Login to APEX +## Task 1 - Login to APEX + +**If you're using APEX outside of Autonomous Database**, log in with the workspace and user you created (e.g., `MOVIESTREAM`). + +**If you're using Autonomous Database and have console access**, follow these steps: -If you are running APEX on a platform other than Autonomous Database, login into APEX as you normally would. Use the database user (e.g., MOVIESTREAM) and APEX workspace (again, MOVIESTREAM) that was created early in this Live Lab. +1. Open the Autonomous Database Console. -If you are running this lab in your tenancy and do not have access to the Autonomous Database console, ask the administrator of the database to provide you with the APEX URL. + ![Autonomous Database Console](images/adb-console.png) -If you are running APEX on Autonomous Database, and have access to the Autonomous Database Console follow the steps below. +2. Scroll to the **APEX instance** section. Click the **Instance name** link. -1. If you have access to the Autonomous Database console, access it now.. + ![APEX instance link](images/adb-console-apex-instance-link.png) -![Autonomous Database Console](images/adb-console.png) +3. Click **Launch APEX** (bookmark this page for easy access). -2. Scroll down until you see APEX instance. Click on the **Instance name** link. + ![Launch APEX](images/adb-console-launch-apex.png) -![APEX instance link](images/adb-console-apex-instance-link.png) +4. Log in to the **MovieStream** workspace as the **MovieStream** user. + *(Default password: `Welcome#1234`)* -3. Launch APEX. It would be a good idea to bookmark this link. + ![APEX Workspace Login](images/apex-workspace-login.png) -![Launch APEX](images/adb-console-launch-apex.png) +You should now be on the APEX home screen. -3. Sign into the MovieStream workspace as the MovieStream user. (The password was Welcome#1234 the script used to create the user earlier in this Workshop.) +## Task 2 - Create a New Application -![APEX Workspace Login](images/apex-workspace-login.png) +Follow these steps to create your app and add a dashboard page: -You should now be at the APEX main page. +1. Click **App Builder** +2. Click **Create** or **Create a New Application** +3. Choose **New Application** +4. Click **Add Page** +5. Select **Dashboard** -## Task 2 Create a New Application + ![Choose Dashboard Page](images/add-page-dashboard.png) -In this task, you will create a new application. Feel free to choose a different theme or menu type. +6. Set up the dashboard: -1. Choose **App Builder**. -1. Choose **Create** or **Create a New Application**. -1. Choose **New Application** -1. Choose **Add Page**. -1. Choose **Dashboard**. +- **Page Name:** `Sales Dashboard` +- **Charts:** + - Chart 1: `Sales` – Line + - Chart 2: `Sales Change Prior Period` – Bar + - Chart 3: `Sales Percent Change Year Ago` – Bar + - Chart 4: `Sales Share of Genre` – Bar +- Go to **Advanced**, check **Set as home page** -![Choose Dashboard Page](images/add-page-dashboard.png) + ![Add Dashboard Page](images/add-dashboard-page.png) -6. Set up the dashboard as follows. -- Provide a **Page Name**, for example _Sales Dashboard_ -- Chart 1: **Name: Sales, Type: Line** -- Chart 2: **Name: Sales Change Prior Period, Type: Bar** -- Chart 3: **Name: Sales Percent Change Year Ago, Type: Bar** -- Chart 4: **Name: Sales Share of Genre, Type: Bar** -- Choose **Advanced** and **Set as home page** +7. Click **Add Page** +8. Name the app (e.g., `MovieStream`) +9. Choose appearance (example used in this lab): -![Add Dashboard Page](images/add-dashboard-page.png) +- Theme: `Redwood Light` +- Navigation: `Top Menu` -7. Press **Add Page** -7. Provide a **Name** for the application, for example _MovieStream_. -7. Choose an appearance. The example in this lab uses: -- **Redwood Light** -- **Top Menu** -10. Press **Save Changes**. -10. Press the **Create Application** button. -10. **Run Application** as the **MOVIESTREAM** user. +10. Click **Save Changes** +11. Click **Create Application** +12. Click **Run Application** and log in as the **MOVIESTREAM** user -Congratulations, you are now the proud owner of four generic graphs! +Congratulations! You now have four placeholder graphs. ![New Dashboard Page](images/new-dashboard-page.png) -You may now **proceed to the next lab** and start making the graphs come to life! +You may now **proceed to the next lab** and bring your dashboard to life! ## Acknowledgements -- Created By/Date - William (Bud) Endress, Product Manager, Autonomous Database, June 2023 -- Last Updated By - William (Bud) Endress, May 2024 +- **Created By** - William (Bud) Endress, Product Manager, Autonomous Database, June 2023 +- **Last Updated By** - William (Bud) Endress, June 2025 Data about movies in this workshop were sourced from **Wikipedia**. -Copyright (C) Oracle Corporation. +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) \ No newline at end of file +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) diff --git a/shared/workshops/adb-datastudio/apex-av-sample-app/explore-tables/explore-tables.md b/shared/workshops/adb-datastudio/apex-av-sample-app/explore-tables/explore-tables.md index 1a6bd8be..c0a826ed 100644 --- a/shared/workshops/adb-datastudio/apex-av-sample-app/explore-tables/explore-tables.md +++ b/shared/workshops/adb-datastudio/apex-av-sample-app/explore-tables/explore-tables.md @@ -1,30 +1,29 @@ # Explore the Data Tables - ## Introduction -You will explore the table in this lab and become familiar with the data. +In this lab, you will explore the data tables and get familiar with the dataset. -Estimated Time: 5 minutes. +**Estimated Time:** 5 minutes ### Objectives -In this lab, you will: - -- Understand the data in the tables used by the analytic view. +- Review the data used by the analytic view. -### Prerequisites: +### Prerequisites - Complete the previous lab. ## Task 1 - Examine the Dimension Tables -Run queries that select from the dimension tables to become familiar with the data. +Run the queries below to review the dimension tables. + +1. Make sure you're connected to SQL Worksheet as the **MOVIESTREAM** user (or other user created in Lab 3). +2. Run the following SQL commands: -1. You should already be connected to SQL Worksheet as the **MOVIESTREAM** users. If you are not, connect to the database using the **MOVIESTREAM** (or other) user created in Lab 3. -1. Run the following commands in SQL Worksheet. +**View the TIME\_DIM table:** -The TIME_DIM tables contain data at the Day, Month, Quarter, and Year levels over two years. +This table includes Day, Month, Quarter, and Year data over two years. ~~~SQL @@ -39,7 +38,9 @@ ORDER BY ~~~ -The CUSTOMER\_DIM table contains data at the City, State, Country, and Continent levels. +**View the CUSTOMER\_DIM table:** + +This table contains customer location details such as City, State, Country, and Continent. ~~~SQL @@ -52,7 +53,9 @@ FROM ~~~ -The SEARCH\_GENRE\_DIM table contains a list of movie genre. In the MovieStream data set, this was the genre that the user searched on while browsing for movies. +**View the SEARCH\_GENRE\_DIM table:** + +This table lists movie genres users searched for. ~~~SQL @@ -69,7 +72,7 @@ ORDER BY ## Task 2 - Examine the Fact Table -The MOVIE\_SALES\_FACT table contains Sales, Quantity, and Discount Percent by day, customer, and search genre. +The MOVIE\_SALES\_FACT table includes daily sales data by customer and genre, with quantity and discount information. ~~~SQL @@ -86,9 +89,9 @@ ORDER BY ~~~ -## Task 3 - Query a Flattened View of the Data +## Task 3 - Query a Flattened View of the Data -The MOVIE\_SALES\_FACT table can be joined to the dimension tables to provide a full, 'flattened' view of the data. +Join the fact table with the dimension tables to create a complete, flattened view of the data. ~~~SQL @@ -122,19 +125,15 @@ WHERE ~~~ -You may now **proceed to the next lab** +You may now **proceed to the next lab**. ## Acknowledgements -- Created By/Date - William (Bud) Endress, Product Manager, Autonomous Database, June 2023 -- Last Updated By - William (Bud) Endress, May 2024 +- **Created By** - William (Bud) Endress, Product Manager, Autonomous Database, June 2023 +- **Last Updated By** - William (Bud) Endress, June 2025 Data about movies in this workshop were sourced from **Wikipedia**. -Copyright (C) Oracle Corporation. +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) \ No newline at end of file +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) \ No newline at end of file diff --git a/shared/workshops/adb-datastudio/apex-av-sample-app/get-acquainted-with-av/get-acquainted-with-av.md b/shared/workshops/adb-datastudio/apex-av-sample-app/get-acquainted-with-av/get-acquainted-with-av.md index ea646191..f4677a89 100644 --- a/shared/workshops/adb-datastudio/apex-av-sample-app/get-acquainted-with-av/get-acquainted-with-av.md +++ b/shared/workshops/adb-datastudio/apex-av-sample-app/get-acquainted-with-av/get-acquainted-with-av.md @@ -2,27 +2,27 @@ ## Introduction -Hierarchy views return data from a single hierarchy. Analytic views join one or more hierarchies to the fact table. Analytic views include all columns from each hierarchy, facts from the fact table, and calculated measures. Hierarchies and analytic views return rows for all levels. +Hierarchy views return data from a single hierarchy. Analytic views join one or more hierarchies with a fact table. They include all hierarchy columns, fact measures, and calculated measures. Both types return rows at all levels. -In this lab, you will get acquainted with the rows and columns returned by hierarchies and analytic views. - -Estimated Time: 5 minutes. +**Estimated Time:** 5 minutes ### Objectives -In this lab, you will: - -- Learn about the different types of columns in hierarchies and analytic views and the rows they return. +- Learn about the columns and rows returned by hierarchies and analytic views. -### Prerequisites: +### Prerequisites - Complete the previous lab. ## Task 1 - Select from the Time Hierarchy -Hierarchies include attribute columns and hierarchical columns. Attribute columns come directly from the table(s) the hierarchy uses. Hierarchical columns are produced by the hierarchy. Every hierarchy has the same set of hierarchical columns. Hierarchies return rows for each level of aggregation. +Hierarchies include: + +- **Attribute columns** from the underlying table(s) +- **Hierarchical columns** generated by the hierarchy -The following query selects all rows and columns from the TIME hierarchy. The HIER_ORDER column sorts the rows in hierarchical order, with child members nested within parent members. +Each hierarchy returns rows for all levels. +Use the `HIER_ORDER` column to sort members in hierarchical order. ~~~SQL @@ -32,14 +32,12 @@ FROM time ORDER BY hier_order; - + ~~~ -Wow, there is a lot to work with! - ## Task 2 - Select Attribute Columns at the Day Level -Selecting attribute columns from the hierarchy at the DAY level returns the original rows and columns from the TIME_DIM table. +To get original data from `TIME_DIM`, filter by the `DAY` level: ~~~SQL @@ -54,12 +52,12 @@ WHERE level_name = 'DAY' ORDER BY hier_order; - + ~~~ ## Task 3 - Select Primary Key, Attribute, and LEVEL_NAME Columns -The next query adds the MEMBER\_UNIQUE\_NAME and LEVEL_NAME columns and selects all rows. MEMBER\_UNIQUE\_NAME is the primary key of the hierarchy. +The following query adds hierarchy metadata: ~~~SQL @@ -77,13 +75,13 @@ ORDER BY ~~~ -The attribute columns - DAY_ID, MONTH, QUARTER, and YEAR - will return values for the current level and ancestor levels. They will return NULL for descendant levels. - -Every hierarchy includes an ALL level with a single value. This value represents the grand total of the hierarchy in the analytic view. +- Attribute columns show values for the current level and its ancestors +- Descendant columns return `NULL` +- All hierarchies include a top-level `ALL` member ## Task 4 - Select all Hierarchical Attributes -This query returns all hierarchical columns of the TIME hierarchy. +This query returns all hierarchy-specific metadata: ~~~SQL @@ -105,34 +103,37 @@ ORDER BY ~~~ -These columns a very useful for navigating hierarchies and creating lists of values in APEX items. +Column usage: -- MEMBER\_UNIQUE\_NAME is the primary key. -- The MEMBER\_NAME, MEMBER\_CAPTION, and MEMBER\_DESCRIPTION columns are usually used to return user-friendly descriptive information about the hierarchy member. -- HIER\_ORDER returns the nested, hierarchical sort order of members. -- LEVEL\_NAME returns the level name of the current member. -- DEPTH returns the hierarchy depth of the current member. -- IS\_LEAF returns 0 or 1, indicating if the current member is the lowest member in a branch of the hierarchy. -- PARENT\_UNIQUE\_NAME returns the primary key of the member parent. -- PARENT\_LEVEL returns the level name of the member's parent. +- `MEMBER_UNIQUE_NAME` – Hierarchy primary key +- `MEMBER_NAME`, `MEMBER_CAPTION`, `MEMBER_DESCRIPTION` – User-friendly values +- `HIER_ORDER` – Sorts members hierarchically +- `LEVEL_NAME` – Shows the member’s level +- `DEPTH` – Distance from the root (ALL level) +- `IS_LEAF` – Indicates if the member has no children +- `PARENT_UNIQUE_NAME`, `PARENT_LEVEL_NAME` – Info about the parent node -**Important - Do not SELECT * FROM Analytic Views** +These columns are ideal for building navigation menus and LOVs in APEX. -Your first thought might be to SELECT * from the analytic view. Resist that thought! +## Important - Do not SELECT * FROM Analytic Views -Analytic views return rows for all detail and aggregate rows. The potential number of rows is the Cartesian product of all hierarchy members. An analytic view that uses four hierarchies with 1000 members each can potentially return 1000^4 or 1,000,0000,000 rows. Data is likely to be sparse, so the actual number of rows is expected to be smaller. +Avoid selecting all rows and columns from an analytic view. -Recommendations: +Analytic views return all combinations of hierarchy members and measures. +If you use 4 hierarchies with 1,000 members each, the result could exceed **1 billion rows** (`1000^4`), though sparse data usually reduces this. -- Select subsets of hierarchies. -- Use filters to limit the rows returned by the query. -- Select only the columns you need. +**Best practices:** + +- Filter your queries +- Select only required columns +- Use specific hierarchy levels ## Task 5 - Take a First Look at the Analytic View -Analytic views include all columns of each hierarchy and measure columns. The hierarchical columns for each hierarchy have the name. The attribute columns will vary by hierarchy. +Analytic views include all hierarchy and measure columns. +Hierarchical columns follow a consistent naming convention, while attribute columns vary. -You can get a list of all columns of the analytic view with the following query: +Get a list of all columns with: ~~~SQL @@ -145,22 +146,18 @@ FROM user_analytic_view_columns ORDER BY order_num; - + ~~~ -You may now **proceed to the next lab** +You may now **proceed to the next lab**. ## Acknowledgements -- Created By/Date - William (Bud) Endress, Product Manager, Autonomous Database, June 2023 -- Last Updated By - William (Bud) Endress, May 2024 +- **Created By** - William (Bud) Endress, Product Manager, Autonomous Database, June 2023 +- **Last Updated By** - William (Bud) Endress, June 2025 Data about movies in this workshop were sourced from **Wikipedia**. -Copyright (C) Oracle Corporation. +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) \ No newline at end of file +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) diff --git a/shared/workshops/adb-datastudio/apex-av-sample-app/install-sample-data/images/rest-login.png b/shared/workshops/adb-datastudio/apex-av-sample-app/install-sample-data/images/rest-login.png new file mode 100644 index 00000000..9526bb9b Binary files /dev/null and b/shared/workshops/adb-datastudio/apex-av-sample-app/install-sample-data/images/rest-login.png differ diff --git a/shared/workshops/adb-datastudio/apex-av-sample-app/install-sample-data/install-sample-data.md b/shared/workshops/adb-datastudio/apex-av-sample-app/install-sample-data/install-sample-data.md index 5a252cec..73c20ca5 100644 --- a/shared/workshops/adb-datastudio/apex-av-sample-app/install-sample-data/install-sample-data.md +++ b/shared/workshops/adb-datastudio/apex-av-sample-app/install-sample-data/install-sample-data.md @@ -22,8 +22,9 @@ In this lab, you will: To load sample data in this lab. -1. Log out of Database Actions/SQL Worksheet as the ADMIN user. +1. **IMPORTANT:** Log out of Database Actions/SQL Worksheet as the **ADMIN)) user. 1. Using SQL Worksheet, connect to the database using the **MOVIESTREAM** user created in Lab 3. +![Login as MOVIESTREAM](images/rest-login.png) 1. Run the following commands in SQL Worksheet. They can be run all at once as a script or individually, as you prefer. @@ -139,15 +140,11 @@ You may now **proceed to the next lab** ## Acknowledgements -- Created By/Date - William (Bud) Endress, Product Manager, Autonomous Database, June 2023 -- Last Updated By - William (Bud) Endress, May 2024 +- **Created By** - William (Bud) Endress, Product Manager, Autonomous Database, June 2023 +- **Last Updated By** - William (Bud) Endress, June 2025 Data about movies in this workshop were sourced from **Wikipedia**. -Copyright (C) Oracle Corporation. +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) \ No newline at end of file +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) \ No newline at end of file diff --git a/shared/workshops/adb-datastudio/apex-av-sample-app/introduction/introduction.md b/shared/workshops/adb-datastudio/apex-av-sample-app/introduction/introduction.md index 63e397bf..fb42bf81 100644 --- a/shared/workshops/adb-datastudio/apex-av-sample-app/introduction/introduction.md +++ b/shared/workshops/adb-datastudio/apex-av-sample-app/introduction/introduction.md @@ -1,47 +1,55 @@ + + # Introduction ## About This Workshop -This workshop uses Oracle APEX and Oracle Analytic Views to build an application that analyzes sales data. The focus of the workshop is using Analytic Views to simplify SQL generation, allow more interactivity, and easily add calculations to reports and charts. +This workshop uses Oracle APEX and Oracle Analytic Views to build an app for analyzing sales data. It focuses on how Analytic Views simplify SQL, support interactivity, and make it easy to add calculations to reports and charts. ### About Analytic Views -An analytic view is a type of view in the Oracle Database that allows users to perform complex queries and calculations on data stored in one or more tables. These views provide a higher level of abstraction over the underlying data, allowing users to access and analyze the data in a more meaningful way. They are typically used in business intelligence and data warehousing applications, and can be based on a single table or multiple tables joined together. +An Analytic View is a type of view in Oracle Database that lets you run complex queries and calculations across one or more tables. It provides a higher-level, easier-to-use layer for analyzing data. + +Analytic Views are ideal for business intelligence and data warehousing. They can be built on single or multiple joined tables. + +### Why Use Analytic Views with APEX? + +APEX developers write the SQL behind reports, charts, and visualizations. As apps become more interactive and calculation-heavy, this SQL becomes harder to write and maintain. Often, developers turn to dynamic PL/SQL to generate the needed queries. -### Why use Analytic Views with APEX? +Analytic Views solve this by: -APEX application developers provide the SQL that powers reports, charts and other data visualizations. Providing this SQL becomes more difficult as the requirements for interactivity and calculations increase. While a report or chart with limited interactivity and calculations might be easily powered by a simple SELECT statement, applications that offer greater interactivity and more calculations will likely require PL/SQL code to generate SELECT statements dynamically. +- Hiding source tables, joins, and logic inside the view +- Providing a simplified, flat structure +- Supporting fast, easy-to-read SQL for queries -Analytic views can dramatically simplify the SQL that an APEX application needs to generate. The Analytic View encapsulates the physical sources (for example, tables), joins, aggregation rules, and calculated measures and presents the data in a simple, flat view that is queried with a relatively simple SELECT statement. The SQL statements used to query analytic views are easier to generate, maintain, and understand as compared to complex queries written directly to tables. +This makes SQL easier to write, debug, and maintain. -Analytic views also relieve the APEX developer from the need to optimize query performance. Analytic Views generate the SQL that is used for query execution. This SQL is highly tuned for specific use cases. +Analytic Views also generate optimized SQL for execution, improving performance without manual tuning. -The bottom line is that APEX developers can simplify application development, provide more analytic content, and often improve query performance by using Analytic Views. +**Bottom line:** APEX developers can build richer apps, reduce complexity, and improve performance using Analytic Views. ### Objectives In this workshop, you will: -- Learn essential concepts about analytic views. -- Learn about the types of analytic views. -- Learn how to query analytic views using sample queries. -- Create an application using a predefined analytic view. +- Learn core Analytic View concepts +- Understand the types of Analytic Views +- Query Analytic Views using sample SQL +- Build an APEX app using a predefined Analytic View ### Questions -If you have any questions about the topics covered in this lab and the entire workshop, please contact us by posting on our public forum on **[cloudcustomerconnect.oracle.com](https://cloudcustomerconnect.oracle.com/resources/32a53f8587/)** and we will respond as soon as possible. +For questions about this lab or the full workshop, please post on our forum at: +**[cloudcustomerconnect.oracle.com](https://cloudcustomerconnect.oracle.com/resources/32a53f8587/)** +We’ll respond as soon as possible. -### Acknowledgements +## Acknowledgements -- Created By/Date - William (Bud) Endress, Product Manager, Autonomous Database, June 2023 -- Last Updated By - William (Bud) Endress, May 2024 +- **Created By** - William (Bud) Endress, Product Manager, Autonomous Database, June 2023 +- **Last Updated By** - William (Bud) Endress, June 2025 Data about movies in this workshop were sourced from **Wikipedia**. -Copyright (C) Oracle Corporation. +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) \ No newline at end of file +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) diff --git a/shared/workshops/adb-datastudio/apex-av-sample-app/learn-more/learn-more.md b/shared/workshops/adb-datastudio/apex-av-sample-app/learn-more/learn-more.md index 739cd51d..5cfe37e3 100644 --- a/shared/workshops/adb-datastudio/apex-av-sample-app/learn-more/learn-more.md +++ b/shared/workshops/adb-datastudio/apex-av-sample-app/learn-more/learn-more.md @@ -1,42 +1,53 @@ # Learn More -Most of what you need to learn has to do with designing and querying analytic views. Start simple and work towards more complex use cases. APEX developers will find it important to understand the semantic model, analytic view DDL statements, and more details about querying analytic views using SQL. +Most of what you need to know centers on designing and querying analytic views. Start with simple models and gradually build toward more advanced use cases. + +As an APEX developer, it's helpful to understand: + +- The semantic model +- Analytic View DDL syntax +- SQL query patterns for analytic views ### Learn More at Live SQL -Analytic View Quick Start tutorials on Oracle Live SQL are a great place to start. +Oracle Live SQL offers excellent tutorials to get started: -- [Analytic View Quick Start Part 1 - Create AVs using Simple DDL](https://livesql.oracle.com/apex/livesql/file/tutorial_OXFYP3OODMIZICXPSZ71O58UG.html) +- [Analytic View Quick Start Part 1 - Create AVs using Simple DDL](https://livesql.oracle.com/apex/livesql/file/tutorial_OXFYP3OODMIZICXPSZ71O58UG.html) - [Analytic View Quick Start Part 2 - Simple Query Templates for Developers](https://livesql.oracle.com/apex/livesql/file/tutorial_OXRHLW558R6D9PTUNCNPB96OZ.html) -The deep dives provide more detail and include the descriptive metadata used by applications such as Oracle Analytic Cloud. +For deeper learning: -- [Creating Analytic Views - Getting Started Deep Dive](https://livesql.oracle.com/apex/livesql/file/tutorial_EDVE861IID1QUD1NIUPU5ALEW.html) +- [Creating Analytic Views - Getting Started Deep Dive](https://livesql.oracle.com/apex/livesql/file/tutorial_EDVE861IID1QUD1NIUPU5ALEW.html) - [Querying Analytic Views - Getting Started Deep Dive](https://livesql.oracle.com/apex/livesql/file/tutorial_EDVE861H8YZ72TOBQQ4KS6EH0.html) -[Oracle Live SQL](https://livesql.oracle.com/apex/f?p=590:49:::NO:RP,49:P49_SEARCH:analytic%20views) has many more Analytic View tutorials. +Browse all related tutorials here: +➡️ [Oracle Live SQL - Search: analytic views](https://livesql.oracle.com/apex/f?p=590:49:::NO:RP,49:P49_SEARCH:analytic%20views) -Additional learning opportunities can be found as the @BudsOracleAV Library[@BudsOracleAV Collateral Library](https://xcsvu3mx9d9bvet-adppm.adb.uk-london-1.oraclecloudapps.com/ords/r/av_demo/bud-s-collateral-library/) +Explore additional resources in the [@BudsOracleAV Collateral Library](https://xcsvu3mx9d9bvet-adppm.adb.uk-london-1.oraclecloudapps.com/ords/r/av_demo/bud-s-collateral-library/) ### Oracle Autonomous Database Data Studio -The Oracle Autonomous Database Data Studio includes tools for designing and querying analytic views. Learn more at this Oracle Live Lab: [Get Started With Analytic Views using Data Studio](https://livelabs.oracle.com/pls/apex/dbpm/r/livelabs/view-workshop?wid=3594) +Oracle Data Studio offers built-in tools for modeling and querying analytic views. +Try the hands-on lab: +👉 [Get Started With Analytic Views using Data Studio](https://livelabs.oracle.com/pls/apex/dbpm/r/livelabs/view-workshop?wid=3594) + +### Analytic Views in Oracle Analytics Cloud + +Oracle Analytics Cloud natively supports Analytic Views: -### Analytic Views and Oracle Analytic Cloud +- Import analytic views into subject areas +- Leverage advanced AV features in OAC dashboards -Oracle Analytic Cloud has native support for Analytic Views. Oracle Analytic Cloud can import Analytic Views into Subject Areas and query them using advanced Analytic View features. You can learn more by watching this short video: [Oracle Analytics Native Connection to Analytic Views in Database](https://www.youtube.com/watch?v=pmhVGvEB98k&t=53s) +Watch the demo: +🎬 [Oracle Analytics Native Connection to Analytic Views in Database](https://www.youtube.com/watch?v=pmhVGvEB98k&t=53s) ## Acknowledgements -- Created By/Date - William (Bud) Endress, Product Manager, Autonomous Database, June 2023 -- Last Updated By - William (Bud) Endress, May 2024 +- **Created By** - William (Bud) Endress, Product Manager, Autonomous Database, June 2023 +- **Last Updated By** - William (Bud) Endress, June 2025 Data about movies in this workshop were sourced from **Wikipedia**. -Copyright (C) Oracle Corporation. +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) +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) diff --git a/shared/workshops/adb-datastudio/apex-av-sample-app/lookup-queries/lookup-queries.md b/shared/workshops/adb-datastudio/apex-av-sample-app/lookup-queries/lookup-queries.md index 50a8db56..0d9cb718 100644 --- a/shared/workshops/adb-datastudio/apex-av-sample-app/lookup-queries/lookup-queries.md +++ b/shared/workshops/adb-datastudio/apex-av-sample-app/lookup-queries/lookup-queries.md @@ -2,23 +2,21 @@ ## Introduction -There are many times when the APEX developer also needs to write queries to provide a list of values for a select list, a pop-up list of values, a radio list, or a tree. +APEX developers often write queries to populate select lists, pop-up LOVs, radio lists, or trees. -Estimated Time: 5 minutes. +**Estimated Time:** 5 minutes ### Objectives -In this lab, you will: - - Examine and run queries used to provide lists of values for APEX items. -### Prerequisites: +### Prerequisites - Complete the previous lab. ## Task 1 - List of Geographies -You may need a list of all geographies from the CUSTOMER_DIM table for a pop-up LOV (list of values) item on a page in your APEX application. If the list of values is for a single level, for example, countries, you can provide a SQL Query like this. +To populate a list of values for a single level (e.g., continent or country), use a simple query like this: ~~~SQL @@ -29,26 +27,26 @@ FROM customer_dim ORDER BY continent; - + ~~~ -You need another query if you need a list for a different level. For example: +Or for a different level: ~~~SQL SELECT DISTINCT country AS d, - country r + country AS r FROM customer_dim ORDER BY country; - + ~~~ ## Task 2 - A List of Geographies with Multiple Levels -If you need a list with more than one level, you might use a query such as this: +To support multiple levels in a single LOV, use `UNION` to combine the results: ~~~SQL @@ -74,7 +72,7 @@ FROM ## Task 3 - A List of Geographies with Multiple Levels and Hierarchical Metadata -Including hierarchical metadata enriches the list of geographies, allowing for filters using levels or hierarchy depth. You might use a query such as this. +Add level and depth metadata to support filtering and sorting: ~~~SQL @@ -112,10 +110,10 @@ ORDER BY , continent , country , d; - - ~~~ + +~~~ -You could create a similar query for time periods. +You can apply the same idea to time periods: ~~~SQL @@ -173,18 +171,15 @@ ORDER BY There must be a better way! -You may now **proceed to the next lab** +You may now **proceed to the next lab**. ## Acknowledgements -- Created By/Date - William (Bud) Endress, Product Manager, Autonomous Database, June 2023 -- Last Updated By - William (Bud) Endress, May 2024 +- **Created By** - William (Bud) Endress, Product Manager, Autonomous Database, June 2023 +- **Last Updated By** - William (Bud) Endress, June 2025 + Data about movies in this workshop were sourced from **Wikipedia**. -Copyright (C) Oracle Corporation. +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) \ No newline at end of file +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) diff --git a/shared/workshops/adb-datastudio/apex-av-sample-app/open-sql-worksheet/images/adb-console-access-db-actions.png b/shared/workshops/adb-datastudio/apex-av-sample-app/open-sql-worksheet - old/images/adb-console-access-db-actions.png similarity index 100% rename from shared/workshops/adb-datastudio/apex-av-sample-app/open-sql-worksheet/images/adb-console-access-db-actions.png rename to shared/workshops/adb-datastudio/apex-av-sample-app/open-sql-worksheet - old/images/adb-console-access-db-actions.png diff --git a/shared/workshops/adb-datastudio/apex-av-sample-app/open-sql-worksheet - old/images/start-sql-worksheet.png b/shared/workshops/adb-datastudio/apex-av-sample-app/open-sql-worksheet - old/images/start-sql-worksheet.png new file mode 100644 index 00000000..ef41b3d2 Binary files /dev/null and b/shared/workshops/adb-datastudio/apex-av-sample-app/open-sql-worksheet - old/images/start-sql-worksheet.png differ diff --git a/shared/workshops/adb-datastudio/apex-av-sample-app/open-sql-worksheet/images/start-sql-worksheet_OLD.png b/shared/workshops/adb-datastudio/apex-av-sample-app/open-sql-worksheet - old/images/start-sql-worksheet_OLD.png similarity index 100% rename from shared/workshops/adb-datastudio/apex-av-sample-app/open-sql-worksheet/images/start-sql-worksheet_OLD.png rename to shared/workshops/adb-datastudio/apex-av-sample-app/open-sql-worksheet - old/images/start-sql-worksheet_OLD.png diff --git a/shared/workshops/adb-datastudio/apex-av-sample-app/open-sql-worksheet - old/open-sql-worksheet.md b/shared/workshops/adb-datastudio/apex-av-sample-app/open-sql-worksheet - old/open-sql-worksheet.md new file mode 100644 index 00000000..2ad9f6a1 --- /dev/null +++ b/shared/workshops/adb-datastudio/apex-av-sample-app/open-sql-worksheet - old/open-sql-worksheet.md @@ -0,0 +1,49 @@ +# Open SQL Worksheet + +## Introduction + +You will connect to Autonomous Database and run SQL commands to create a user, add workshop utilities, and load sample data. This lab provides instructions for connecting to SQL Worksheet using your browser. If you prefer to use a different tool such as SQL Developer desktop, feel free to do so. + +Estimated Time: Less than 5 minutes. + +### Objectives + +In this lab, you will: + +- Open Oracle Autonomous Database Actions. +- Open SQL Worksheet. + +### Prerequisites: + +- Access to the Autonomous Database Console or a URL to Autonomous Database Actions. + +## Task 1 - Connect to the Database Actions Tool Set + +You will use SQL Worksheet to run a script that loads data and creates the sample analytic view. You will also the Data Studio Analysis tool to view the design of the analytic view and run a report. Data Studio is part of the Database Actions tool set, which contains many different types of tools. + +You can connect to Database Actions using the Autonomous Database Service Console or a URL provided by your Autonomous Database administrator. + +1. Choose the Database Actions button if you connect via the Autonomous Database Service Console. + +![Open Database Actions](images/adb-console-access-db-actions.png) + +## Task 2 - Connect to SQL Worksheet + +SQL Worksheet allows you to run SQL commands in the Oracle Database. You will run SQL commands to create a database user, load sample data, and create the analytic view. + +1. Choose the SQL button. + +![Open Database Actions](images/start-sql-worksheet.png) + +You may now **proceed to the next lab**. + +## Acknowledgements + +- **Created By** - William (Bud) Endress, Product Manager, Autonomous Database, June 2023 +- **Last Updated By** - William (Bud) Endress, June 2025 + +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) \ No newline at end of file diff --git a/shared/workshops/adb-datastudio/apex-av-sample-app/open-sql-worksheet/images/admin-login.png b/shared/workshops/adb-datastudio/apex-av-sample-app/open-sql-worksheet/images/admin-login.png new file mode 100644 index 00000000..4074da07 Binary files /dev/null and b/shared/workshops/adb-datastudio/apex-av-sample-app/open-sql-worksheet/images/admin-login.png differ diff --git a/shared/workshops/adb-datastudio/apex-av-sample-app/open-sql-worksheet/images/rest-data-services.png b/shared/workshops/adb-datastudio/apex-av-sample-app/open-sql-worksheet/images/rest-data-services.png new file mode 100644 index 00000000..66675dad Binary files /dev/null and b/shared/workshops/adb-datastudio/apex-av-sample-app/open-sql-worksheet/images/rest-data-services.png differ diff --git a/shared/workshops/adb-datastudio/apex-av-sample-app/open-sql-worksheet/images/sql-worksheet.png b/shared/workshops/adb-datastudio/apex-av-sample-app/open-sql-worksheet/images/sql-worksheet.png new file mode 100644 index 00000000..6de6bf26 Binary files /dev/null and b/shared/workshops/adb-datastudio/apex-av-sample-app/open-sql-worksheet/images/sql-worksheet.png differ diff --git a/shared/workshops/adb-datastudio/apex-av-sample-app/open-sql-worksheet/images/start-sql-worksheet.png b/shared/workshops/adb-datastudio/apex-av-sample-app/open-sql-worksheet/images/start-sql-worksheet.png index ef41b3d2..d5becc32 100644 Binary files a/shared/workshops/adb-datastudio/apex-av-sample-app/open-sql-worksheet/images/start-sql-worksheet.png and b/shared/workshops/adb-datastudio/apex-av-sample-app/open-sql-worksheet/images/start-sql-worksheet.png differ diff --git a/shared/workshops/adb-datastudio/apex-av-sample-app/open-sql-worksheet/open-sql-worksheet.md b/shared/workshops/adb-datastudio/apex-av-sample-app/open-sql-worksheet/open-sql-worksheet.md index ca93db67..f2fc91db 100644 --- a/shared/workshops/adb-datastudio/apex-av-sample-app/open-sql-worksheet/open-sql-worksheet.md +++ b/shared/workshops/adb-datastudio/apex-av-sample-app/open-sql-worksheet/open-sql-worksheet.md @@ -2,52 +2,53 @@ ## Introduction -You will connect to Autonomous Database and run SQL commands to create a user, add workshop utilities, and load sample data. This lab provides instructions for connecting to SQL Worksheet using your browser. If you prefer to use a different tool such as SQL Developer desktop, feel free to do so. +To complete this lab, you’ll connect to Oracle Autonomous Database and run SQL commands to create a user and load sample data. These steps use the browser-based **SQL Worksheet**. If you prefer, you may use a different tool like **SQL Developer**. -Estimated Time: Less than 5 minutes. +**Estimated Time:** Less than 5 minutes ### Objectives -In this lab, you will: +- Open and access SQL Worksheet -- Open Oracle Autonomous Database Actions. -- Open SQL Worksheet. +### Prerequisites -### Prerequisites: +- Access to your Autonomous Database using the database URL as the **ADMIN** user. The URL will look similar to this: -- Access to the Autonomous Database Console or a URL to Autonomous Database Actions. + https://xcsvfpwxb7cd9bvet-adppm.adb.uk-london-1.oraclecloudapps.com/ -## Task 1 - Connect to the Database Actions Tool Set +## Task 1 – Login to Autonomous Database -You will use SQL Worksheet to run a script that loads data and creates the sample analytic view. You will also the Data Studio Analysis tool to view the design of the analytic view and run a report. Data Studio is part of the Database Actions tool set, which contains many different types of tools. +Follow these steps: -You can connect to Database Actions using the Autonomous Database Service Console or a URL provided by your Autonomous Database administrator. +1. Access your Autonomous Database using the URL. -1. Choose the Database Actions button if you connect via the Autonomous Database Service Console. +![REST Data Servicews](images/rest-data-services.png) -![Open Database Actions](images/adb-console-access-db-actions.png) +1. Login as the **ADMIN** user. -## Task 2 - Connect to SQL Worksheet + ![ADMIN logtin](images/admin-login.png) -SQL Worksheet allows you to run SQL commands in the Oracle Database. You will run SQL commands to create a database user, load sample data, and create the analytic view. +## Task 2 – Open SQL Worksheet -1. Choose the SQL button. +You will use SQL Worksheet to run SQL commands needed for the workshop. -![Open Database Actions](images/start-sql-worksheet.png) +1. Select the **Development** tab and click the **SQL** button. -You may now **proceed to the next lab**. + ![Open SQL Worksheet](images/start-sql-worksheet.png) + +SQL Worksheet will look like this: + +![SQL Worksheet](images/sql-worksheet.png) + +You’re now ready to **proceed to the next lab**. ## Acknowledgements -- Created By/Date - William (Bud) Endress, Product Manager, Autonomous Database, June 2023 -- Last Updated By - William (Bud) Endress, May 2024 +- **Created By** - William (Bud) Endress, Product Manager, Autonomous Database, June 2023 +- **Last Updated By** - William (Bud) Endress, June 2025 Data about movies in this workshop were sourced from **Wikipedia**. -Copyright (C) Oracle Corporation. +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) \ No newline at end of file +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) diff --git a/shared/workshops/adb-datastudio/using-avs/add-hierarchies/add-hierarchies.md b/shared/workshops/adb-datastudio/using-avs/add-hierarchies/add-hierarchies.md index 2d1f2f52..b4851d17 100644 --- a/shared/workshops/adb-datastudio/using-avs/add-hierarchies/add-hierarchies.md +++ b/shared/workshops/adb-datastudio/using-avs/add-hierarchies/add-hierarchies.md @@ -2,135 +2,120 @@ ## Introduction -The Analytic View is functional, but not very interesting, with just a single hierarchy and a few measures. The data supports additional hierarchies for geography and the movie genre that was used to search for movies to view. It’s time to add more hierarchies. In the real world, analytic views often use many hierarchies. +Your Analytic View works, but it only includes one hierarchy. +Now it's time to add more—like geography and movie genre. +Real-world models often include several hierarchies. -Estimated Time: 10 Minutes +**Estimated Time: 10 minutes** ### Objectives -In this lab you will: +You will: -- Add additional hierarchies to the Analytic View +- Add additional hierarchies to the Analytic View. -### Prerequisites: +### Prerequisites - Complete the previous lab. ## Task 1 - Return to Analytic View Editor -You can add hierarchies using the same methods that you added the Time hierarchy. First, you need to switch back to the Analytic View editor. +1. Click **Edit Analytic View** to reopen the editor. -1. Choose the **Edit Analytic View** command. - -![Edit Analytic View](images/edit-analytic-view.png) - -You are returned to the editor. + ![Edit Analytic View](images/edit-analytic-view.png) ## Task 2 - Add More Data Sources (Tables) -Add new Data Sources for the hierarchies. Repeat the following steps for the CUSTOMER\_DIM and SEARCH\_GENRE\_DIM views. +Add tables for the new hierarchies. -1. Select **Data Sources**. +1. Go to **Add Hierarchy Sources**. -![Add Hierarchy Sources](images/add-hierarchy-sources-1.png) + ![Add Hierarchy Sources](images/add-hierarchy-sources-0.png) -2. Select both **CUSTOMER\_DIM** and **SEARCH\_GENRE\_DIM**. -3. Leave **Generate and Add Hierarchy from Source** off (disabled). -4. Press the **OK** button. +2. Select **CUSTOMER\_DIM** and **SEARCH\_GENRE_DIM**. +3. Turn off **Generate and Add Hierarchy from Source**. +4. Click **OK**. -If you leave **Generate and Add Hierarchy from Source** on, which is easy to do, just close the dialog and carry on with the lab. +![Add Hierarchy Sources](images/add-hierarchy-sources-1.png) -![Add Hierarchy Sources](images/add-hierarchy-sources-2.png) +All tables have been added. -When you are done your screen should look like this. +You will define joins **after** creating new hierarchies. -![New Hierarchy Sources](images/add-hierarchy-sources-3.png) + ![Add Hierarchy Sources](images/add-hierarchy-sources-2.png) ## Task 3 - Add Customer and Search Genre Hierarchies -Now you can add hierarchies. For each table, create hierarchies using the columns as described in the table below. Be sure to sort the levels according to the Level Order column in the table. - -|Table |Column |Level Order | -|-----------------------|-----------------------|-----------:| -|CUSTOMER_DIM |CONTINENT | 1 | -|CUSTOMER_DIM |COUNTRY | 2 | -|CUSTOMER_DIM |STATE_PROVINCE | 3 | -|CUSTOMER_DIM |CITY | 4 | -|CUSTOMER_DIM |CUSTOMER_ID | 5 | -|SEARCH\_GENRE_DIM |GENRE_NAME | 1 | -| | | | - -For example, to add a hierarchy: +Use the table below to create levels for each hierarchy: -1. Right click **Hierarchies** -2. Choose **Add Hierarchy** -3. Choose **CUSTOMER_DIM** -4. Choose **CONTINENT** +| Table | Column | Level Order | +|------------------|------------------|-------------| +| CUSTOMER_DIM | CONTINENT | 1 | +| CUSTOMER_DIM | COUNTRY | 2 | +| CUSTOMER_DIM | STATE_PROVINCE | 3 | +| CUSTOMER_DIM | CITY | 4 | +| CUSTOMER_DIM | CUSTOMER_ID | 5 | +| SEARCH\_GENRE\_DIM | GENRE_NAME | 1 | -![Add Continent](images/add-continent-hierarchy.png) +### Create Customer Hierarchy -After creating the hierarchy, your screen will look like this: +1. Right-click **Hierarchies** -![Continent Hierarchy](images/edit-continent-hierarchy-2.png) +![Add Hierarchy Sources](images/add-hierarchy-sources-0.png) -Next, add levels. For example: +2. Choose **CUSTOMER_DIM** > **CONTINENT** -1. Select the **CONTINENT** hierarchy. -2. Choose **Add Level**. -3. Select the **COUNTRY** column. -4. Repeat for **STATE\_PROVINCE**, and **CITY**. + ![Add Continent](images/add-continent-hierarchy.png) -When you are done with this hierarchy your screen should look like this. +The new Continent hierarchy. -![Continent Hierarchy](images/edit-continent-hierarchy-3.png) + ![Continent Hierarchy](images/new-continent-hierarchy.png) -Use the same steps to create the Search Genre hierarchy. +3. Rename the CONINENT hierachy to **Geography** , then click **Add Level** +4. Add **COUNTRY**, **STATE_PROVINCE**, and **CITY** -1. Repeat the steps used with the **SEARCH\_GENRE\_DIM** table using the GENRE\_NAME column. + ![Continent Hierarchy](images/edit-continent-hierarchy-2.png) -2. Rename the hierarchy and level to "Genre". +### Create Search Genre Hierarchy -The Search Genre hierarchy includes only a single level. A hierarchy is valid with a single level. +1. Repeat the same steps with **SEARCH\_GENRE\_DIM** using **GENRE_NAME** +2. Rename the hierarchy and level to **Genre** -All hierarchies include the levels you define plus an ALL level. The ALL level includes a single, top-of-hierarchy member (value). +Even with just one level, the hierarchy is valid. All hierarchies include an **ALL** level by default. ## Task 4 - Set Joins for New Hierarchies -Joins for each of the new hierarchies can now be added. +Define joins to link the new hierarchy tables to the fact table: -1. Choose **Data Sources** -2. Set Joins as listed in the table below. +| Hierarchy Source | Hierarchy Column | Fact Column | +|--------------------|------------------|-------------| +| TIME_DIM | DAY_ID | DAY_ID | +| CUSTOMER_DIM | CUSTOMER_ID | CUST_ID | +| SEARCH\_GENRE\_DIM | GENRE_ID | GENRE_ID | -|Hierarchy Source |Hierarchy Column |Fact Column | -|-----------------------|-----------------------|-------------| -|TIME_DIM |DAY_ID | DAY_ID | -|CUSTOMER_DIM |CUSTOMER_ID | CUST_ID | -|SEARCH\_GENRE_DIM |STATE_PROVINCE | GENRE_ID | -| | | | +1. Go to **Data Sources** and configure the joins. -The completed joins will look like this. - -![Three Table Joins](images/completed_joins.png) + ![Three Table Joins](images/completed_joins.png) ## Task 5 - Update the Analytic View -Now would be a good time to save your work and update the analytic view. +1. Click the **Update** button to apply your changes. -1. Press the **Update** button. + ![Update Analytic View](images/update-analytic-view.png) You may now **proceed to the next lab** +When you **update** the analytic view, you are returned to the Analysis reporting application. + + ![Return to Analysis](images/return-to-analysis.png) + ## Acknowledgements -- Created By/Date - William (Bud) Endress, Product Manager, Autonomous Database, February 2023 -- Last Updated By - William (Bud) Endress, May 2024 +- **Created By** - William (Bud) Endress, Product Manager, Autonomous Database, February 2023 +- **Last Updated By** - William (Bud) Endress, June 2025 Data about movies in this workshop were sourced from **Wikipedia**. -Copyright (C) Oracle Corporation. +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) +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) diff --git a/shared/workshops/adb-datastudio/using-avs/add-hierarchies/images/add-continent-hierarchy.png b/shared/workshops/adb-datastudio/using-avs/add-hierarchies/images/add-continent-hierarchy.png index 490773ee..e1572395 100644 Binary files a/shared/workshops/adb-datastudio/using-avs/add-hierarchies/images/add-continent-hierarchy.png and b/shared/workshops/adb-datastudio/using-avs/add-hierarchies/images/add-continent-hierarchy.png differ diff --git a/shared/workshops/adb-datastudio/using-avs/add-hierarchies/images/add-hierarchy-sources-0.png b/shared/workshops/adb-datastudio/using-avs/add-hierarchies/images/add-hierarchy-sources-0.png new file mode 100644 index 00000000..6d252e17 Binary files /dev/null and b/shared/workshops/adb-datastudio/using-avs/add-hierarchies/images/add-hierarchy-sources-0.png differ diff --git a/shared/workshops/adb-datastudio/using-avs/add-hierarchies/images/add-hierarchy-sources-1.png b/shared/workshops/adb-datastudio/using-avs/add-hierarchies/images/add-hierarchy-sources-1.png index 610853f4..b8433edc 100644 Binary files a/shared/workshops/adb-datastudio/using-avs/add-hierarchies/images/add-hierarchy-sources-1.png and b/shared/workshops/adb-datastudio/using-avs/add-hierarchies/images/add-hierarchy-sources-1.png differ diff --git a/shared/workshops/adb-datastudio/using-avs/add-hierarchies/images/add-hierarchy-sources-2.png b/shared/workshops/adb-datastudio/using-avs/add-hierarchies/images/add-hierarchy-sources-2.png index a8b05e10..c643d76c 100644 Binary files a/shared/workshops/adb-datastudio/using-avs/add-hierarchies/images/add-hierarchy-sources-2.png and b/shared/workshops/adb-datastudio/using-avs/add-hierarchies/images/add-hierarchy-sources-2.png differ diff --git a/shared/workshops/adb-datastudio/using-avs/add-hierarchies/images/add_continent_hierarchy.png b/shared/workshops/adb-datastudio/using-avs/add-hierarchies/images/add_continent_hierarchy.png deleted file mode 100644 index 490773ee..00000000 Binary files a/shared/workshops/adb-datastudio/using-avs/add-hierarchies/images/add_continent_hierarchy.png and /dev/null differ diff --git a/shared/workshops/adb-datastudio/using-avs/add-hierarchies/images/completed_joins.png b/shared/workshops/adb-datastudio/using-avs/add-hierarchies/images/completed_joins.png index ccf646f8..b3dea607 100644 Binary files a/shared/workshops/adb-datastudio/using-avs/add-hierarchies/images/completed_joins.png and b/shared/workshops/adb-datastudio/using-avs/add-hierarchies/images/completed_joins.png differ diff --git a/shared/workshops/adb-datastudio/using-avs/add-hierarchies/images/edit-analytic-view.png b/shared/workshops/adb-datastudio/using-avs/add-hierarchies/images/edit-analytic-view.png index efdf6229..ee452d91 100644 Binary files a/shared/workshops/adb-datastudio/using-avs/add-hierarchies/images/edit-analytic-view.png and b/shared/workshops/adb-datastudio/using-avs/add-hierarchies/images/edit-analytic-view.png differ diff --git a/shared/workshops/adb-datastudio/using-avs/add-hierarchies/images/edit-continent-hierarchy-2.png b/shared/workshops/adb-datastudio/using-avs/add-hierarchies/images/edit-continent-hierarchy-2.png index 36dcc714..9951537a 100644 Binary files a/shared/workshops/adb-datastudio/using-avs/add-hierarchies/images/edit-continent-hierarchy-2.png and b/shared/workshops/adb-datastudio/using-avs/add-hierarchies/images/edit-continent-hierarchy-2.png differ diff --git a/shared/workshops/adb-datastudio/using-avs/add-hierarchies/images/edit-continent-hierarchy-3.png b/shared/workshops/adb-datastudio/using-avs/add-hierarchies/images/edit-continent-hierarchy-3.png deleted file mode 100644 index c33baa32..00000000 Binary files a/shared/workshops/adb-datastudio/using-avs/add-hierarchies/images/edit-continent-hierarchy-3.png and /dev/null differ diff --git a/shared/workshops/adb-datastudio/using-avs/add-hierarchies/images/new-continent-hierarchy.png b/shared/workshops/adb-datastudio/using-avs/add-hierarchies/images/new-continent-hierarchy.png new file mode 100644 index 00000000..d49a418b Binary files /dev/null and b/shared/workshops/adb-datastudio/using-avs/add-hierarchies/images/new-continent-hierarchy.png differ diff --git a/shared/workshops/adb-datastudio/using-avs/add-hierarchies/images/return-to-analysis.png b/shared/workshops/adb-datastudio/using-avs/add-hierarchies/images/return-to-analysis.png new file mode 100644 index 00000000..bdeb0835 Binary files /dev/null and b/shared/workshops/adb-datastudio/using-avs/add-hierarchies/images/return-to-analysis.png differ diff --git a/shared/workshops/adb-datastudio/using-avs/add-hierarchies/images/update-analytic-view.png b/shared/workshops/adb-datastudio/using-avs/add-hierarchies/images/update-analytic-view.png new file mode 100644 index 00000000..ab5734f7 Binary files /dev/null and b/shared/workshops/adb-datastudio/using-avs/add-hierarchies/images/update-analytic-view.png differ diff --git a/shared/workshops/adb-datastudio/using-avs/create-calculated-measures/create-calculated-measures.md b/shared/workshops/adb-datastudio/using-avs/create-calculated-measures/create-calculated-measures.md index 7ff4d3da..d1bb64e5 100644 --- a/shared/workshops/adb-datastudio/using-avs/create-calculated-measures/create-calculated-measures.md +++ b/shared/workshops/adb-datastudio/using-avs/create-calculated-measures/create-calculated-measures.md @@ -2,65 +2,70 @@ ## Introduction -In the Analytic View, there are two types of measures: +Analytic Views support two types of measures: -- **Fact measures** are from the fact table. Fact measures are mapped to the fact table and include aggregation operators. +- **Fact measures**: Based on columns in the fact table. Use aggregation functions like `SUM`. +- **Calculated measures**: Defined with expressions. These reference fact or other calculated measures and do **not** use aggregation operators. -- **Calculated measures** are created using expression. Calculated measures reference fact measures or other calculated measures, and do not include aggregation operators. +Calculated measures use the Analytic View expression language and can include any SQL single-row function. -The analytic view includes an expression language used for calculated -measures. You can also use any SQL single-row function in the definition -of a calculated measure. - -Estimated Time: 5 minutes. +**Estimated Time: 5 minutes** ### Objectives -In this lab you will: +You will: - Create a calculated measure. -### Prerequisites: +### Prerequisites - Complete the previous lab. -## Task 1 Create a Calculated Measure +## Task 1 - Create a Calculated Measure + +Create a calculated measure to show percent change in sales from the previous period. + +1. Return to the Analytic View Designe. + + ![Edit Analytic View](images/edit-analytic-view.png) + +2. Right-click **Calculations** +3. Choose **Add Calculated Measure** + + ![Add Calculated Measure](images/add-calculated-measure.png) + +4. Enter the name and press Enter: + `SALES_PCT_CHANGE_PRIOR_PERIOD` -Create a calculated measure that returns the Percent Change in Sales -from the current period as compared to the prior period. + When you press Enter, the Caption and Description automatically default to the the measure name. -1. Right click **Calculations** -2. Choose **Add Calculated Measure** +5. Set the **Calculation Category** to: + `Prior and Future Period` -![Add Calculated Measure](images/add-calculated-measure.png) +6. Set the **Calculation Template** to: + `Percent Difference From Prior Period` -3. Enter the measure name **SALES\_PCT\_CHANGE\_PRIOR\_PERIOD**. -4. Choose the Calculation Category **Prior and Future Period**. -5. Choose the Calculation Template **Percent Difference From Prior Period**. -6. Choose the measure **SALES**. -7. Choose the **TIME** hierarchy. +7. Choose the base measure: + `SALES` -The measure settings should look like this. +8. Choose the hierarchy: + `TIME` -![Sales Percent Change Prior Period measure](images/sales-pct-chg-calc-meas.png) +The configuration should look like this: -You can now update the Analytic View objects in the database. + ![Sales Percent Change Prior Period measure](images/sales-pct-chg-calc-meas.png) -1. Press the **Update** button on the lower right. +8. Click the **Update** button in the lower-right corner to save. You may now **proceed to the next lab** ## Acknowledgements -- Created By/Date - William (Bud) Endress, Product Manager, Autonomous Database, February 2023 -- Last Updated By - William (Bud) Endress, May 2024 +- **Created By** - William (Bud) Endress, Product Manager, Autonomous Database, February 2023 +- **Last Updated By** - William (Bud) Endress, June 2025 Data about movies in this workshop were sourced from **Wikipedia**. -Copyright (C) Oracle Corporation. +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) +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) diff --git a/shared/workshops/adb-datastudio/using-avs/create-calculated-measures/images/add-calculated-measure.png b/shared/workshops/adb-datastudio/using-avs/create-calculated-measures/images/add-calculated-measure.png index 41ba4156..6d07d846 100644 Binary files a/shared/workshops/adb-datastudio/using-avs/create-calculated-measures/images/add-calculated-measure.png and b/shared/workshops/adb-datastudio/using-avs/create-calculated-measures/images/add-calculated-measure.png differ diff --git a/shared/workshops/adb-datastudio/using-avs/create-calculated-measures/images/edit-analytic-view.png b/shared/workshops/adb-datastudio/using-avs/create-calculated-measures/images/edit-analytic-view.png new file mode 100644 index 00000000..f190ae7d Binary files /dev/null and b/shared/workshops/adb-datastudio/using-avs/create-calculated-measures/images/edit-analytic-view.png differ diff --git a/shared/workshops/adb-datastudio/using-avs/create-calculated-measures/images/sales-pct-chg-calc-meas.png b/shared/workshops/adb-datastudio/using-avs/create-calculated-measures/images/sales-pct-chg-calc-meas.png index ee8e9ec0..cbc48753 100644 Binary files a/shared/workshops/adb-datastudio/using-avs/create-calculated-measures/images/sales-pct-chg-calc-meas.png and b/shared/workshops/adb-datastudio/using-avs/create-calculated-measures/images/sales-pct-chg-calc-meas.png differ diff --git a/shared/workshops/adb-datastudio/using-avs/create-hierarchy/create-hierarchy.md b/shared/workshops/adb-datastudio/using-avs/create-hierarchy/create-hierarchy.md index 6518f36b..7e41ce9f 100644 --- a/shared/workshops/adb-datastudio/using-avs/create-hierarchy/create-hierarchy.md +++ b/shared/workshops/adb-datastudio/using-avs/create-hierarchy/create-hierarchy.md @@ -2,139 +2,119 @@ ## Introduction -Every Analytic View must reference at least one hierarchy. A hierarchy can have one or more levels, where a level is a collection of hierarchy members at the same level of aggregation. For example, Months, Years, Cities, and Countries might be levels or Time and Geography hierarchies +Every Analytic View must include at least one hierarchy. -A hierarchy organizes levels into aggregation paths. For example, Days aggregate to Months, Months aggregate to Quarters, and Quarters aggregation to Years. +A hierarchy organizes data into levels such as Year, Quarter, Month, and Day. Each level groups data at a specific level of aggregation. For example, Days roll up to Months, which roll up to Quarters, which roll up to Years. -In the terminology of the Hierarchy view, the Day level is the child of the Month level, the Month level is the child of the Quarter level, and so on. - -Hierarchies can use data from lookup tables or directly from the fact table. In this lab, all hierarchies will be created from lookup tables. +Hierarchies can be built from lookup tables or directly from fact tables. In this lab, all hierarchies will use lookup tables. To create a hierarchy, you will: -- Add a new table to the Analytic View. +- Add a new table. - Create levels. -- Specify the joins between the hierarchy table and the fact table. +- Define joins between the lookup and fact tables. ### Objectives -In this lab you will: +You will: - Create a hierarchy. -### Prerequisites: +### Prerequisites - Complete the previous lab. -Estimated Time: 10 minutes. +**Estimated Time: 10 minutes** ## Task 1 - Add a New Table -Right-click on Data Sources and Choose Add Hierarchy Sources. - -![Add Hierarchy Sources](images/add-hierarchy-sources-1.png) +1. Right-click **Data Sources** and select **Add Hierarchy Sources**. -2. **Turn off Generate and Add Hierarchy from Source** (you will do that yourself) and choose the TIME_DIM table. + ![Add Hierarchy Sources](images/add-hierarchy-sources-1.png) -![Add Hierarchy Sources](images/add-time-dim-hier-source.png) +2. Turn off **Generate and Add Hierarchy from Source**, then choose the `TIME_DIM` table. -The table will be added to the sources. You will specify the join between this table and the fact table after you create levels in the hierarchy. + ![Add Hierarchy Sources](images/add-time-dim-hier-source.png) -![Data Sources](images/data-sources.png) +The table will appear under Data Sources. You’ll define the join after creating the hierarchy levels. -## Task 2 - Create a Time Hierarchy +You can expand TIME_DIM using the menu at the top right of the table. -A hierarchy is created by choosing a column of a hierarchy table. A level in the hierarchy is automatically created. Additional levels can be added later. + ![Data Sources](images/data-sources.png) -1. Right-click Hierarchies. - -2. Choose TIME_DIM. +## Task 2 - Create a Time Hierarchy -3. Choose YEAR. +1. Right-click **Hierarchies**. -**Pro-tip:** Add levels from the highest level to the lowest level and you will not need to sort the levels later. +2. Choose **TIME_DIM**, then select **YEAR**. -![Add Hierarchy Sources](images/add-time-hierarchy.png) + ![Add Hierarchy Sources](images/add-time-hierarchy.png) -A hierarchy named YEAR with a single level, YEAR, will be created. +This creates a hierarchy named `YEAR` with one level: `YEAR`. -![New Time Hierarchy](images/new-time-hierarchy.png) +3. Press **Preview Data** to examine the `TIME_DIM` table. -Whether you like the name YEAR for this hierarchy is a matter of personal opinion (or more importantly, the end user's opinions). Because this hierarchy will have additional levels, rename the hierarchy to Time. + ![Press Preview](images/press-preview.png) -4. Select the **YEAR** hierarchy (as shown above). + ![Preview Time Table](images/preview-time-table.png) -4. Enter **TIME** in the Hierarchy Name field. +3. Rename the hierarchy: -5. Enter **Time** in the Caption field. You can also enter **Time** in the Description. + - Select the `YEAR` hierarchy. + - Enter `TIME` in the **Hierarchy Name** field. + - Enter `Time` in both the **Caption** and **Description** fields. -![Rename Hierarchy to Time](images/rename-hier-to-time.png) + ![Rename Hierarchy to Time](images/rename-hier-to-time.png) -You can choose to set the hierarchy to Time. Some applications might benefit from knowing that the hierarchy is Time, but that is not required for time series calculations such as LEAD and LAG. xLeads and lags are calculated using the order of members within the hierarchy as set by the Sort By property in the Analysis design tool (which sets the ORDER BY property of a level in the attribute dimension SQL DDL). +You may optionally set the hierarchy type to **Time**, though this is not required for LEAD/LAG. Time calculations rely on the **Sort By** setting in each level. ## Task 3 - Add Quarter, Month, and Day Levels -Next, you will add the Quarter, Month and Day levels to the Time hierarchy. - -Viewing data in the TIME_DIM table may help you understand what additional levels can be added to the hierarchy. - -1. Press the **Preview Data** button. - -![Preview Time Table](images/preview-time-table.png) - -Hierarchies include one or more levels where each member of a child (lower) level has a single parent value in the parent (upper) level. For example, each day belongs to a single month, each month belongs to a single quarter, and each quarter belongs to a single year. Some people call this a *natural hierarchy*. - -A hierarchy of DAY_ID > MONTH > QUARTER > YEAR fits the description of a natural hierarchy. +Use levels that form a *natural hierarchy*, where each child has a single parent: -A hierarchy such as DAY\_ID \> MONTH\_OF\_YEAR > QUARTER > YEAR does not fit the description of a natural hierarchy because there is more than one QUARTER value for each MONTH\_OF\_YEAR. +- `DAY_ID` → `MONTH` → `QUARTER` → `YEAR` is valid +- `DAY_ID` → `MONTH_OF_YEAR` → `QUARTER` → `YEAR` is not, because `MONTH_OF_YEAR` has multiple parent quarters. -2. Press the **Close** button to close the preview. +2. Close the preview. -3. Click on **Add Level** and choose the **QUARTER** column. +3. Click **Add Level**, then select the **QUARTER** column. -![Preview Time Table](images/add-quarter-level.png) + ![Preview Time Table](images/add-quarter-level.png) -4 Repeat for the **MONTH** and **DAY** levels using the **MONTH** and **DAY_ID** columns. +4. Repeat for **MONTH** and **DAY_ID**. -![All Time Levels](images/all-time-levels-sorted.png) + ![All Time Levels](images/all-time-levels.png) ## Task 4 - Examine Level Properties -1. Select the YEAR level. +1. Select the **YEAR** level. -![Year Level Properties](images/year-level-properties.png) + ![Year Level Properties](images/year-level-properties.png) -Notes about level properties: +Key notes: -- By default, the level and all properties use the column selected when creating the level. Because YEAR is a good name for the level, the level name does not need to be changed. -- Values in the top section (Level Name, Caption and Description) are identifiers. These are names and descriptors in the model. -- Values in the bottom section (Level Key, Member Name, etc.) map the column to data elements of the hierarchy. - - **Level Key** is the unique identifier of the hierarchy members. - - **Member Name**, **Member Caption**, and **Member Description** are all ‘slots’ in the hierarchy where properties of the hierarchy member can be included. Member Caption is almost always used as a friendly name for the Level Key. This is important when the Level Key value is not a user-readable value. - - If any of the columns used as Member Name, Member Caption, and Member description have a 1:1 relationship with the Level Key, that column can be used as an **Alternate Key**. Alternate Level Keys are useful in some cases, but that is a more advanced topic. - - Hierarchies have a default sort order. This is determined by the values in the column mapped to **Sort By**. The default order is important because it is used in some LEAD and LAG calculations. Applications can also use that column to order hierarchy values in a query. +- The **Level Name**, **Caption**, and **Description** are model identifiers. +- **Level Key** is the unique ID for each member. +- **Member Caption** is the friendly display value for the level. +- **Sort By** controls default sort order—important for functions like LEAD/LAG. -In this data, a single column can be used for all properties of a level. As a result, you do not need to make any changes. +In this case, all properties can use the same column. -It is common for different columns in a table to be used for different properties of a level. For example, if the unique key of a level is an integer value or some other code (for example, a product code) you would probably use a different column for the Caption and Sort By properties This is most common for the lowest level of a hierarchy when the lookup table is joined to the fact table. +In other datasets, you may need different columns for each property—e.g., a numeric key with a descriptive caption. -**Pro tip**: Easy analytic view design starts with good column names in tables. The Analysis design tool will use column names as the default for hierarchy, level and measure names (replacing underscores with spaces in Captions). +**Pro Tip:** Use clear column names in your tables. The design tool auto-generates names using column names (underscores are replaced with spaces for captions). -Feel free to examine the properties of each level. +You can now explore other level properties as needed. You may now **proceed to the next lab** ## Acknowledgements -- Created By/Date - William (Bud) Endress, Product Manager, Autonomous Database, February 2023 -- Last Updated By - William (Bud) Endress, May 2024 +- **Created By** - William (Bud) Endress, Product Manager, Autonomous Database, February 2023 +- **Last Updated By** - William (Bud) Endress, June 2025 Data about movies in this workshop were sourced from **Wikipedia**. -Copyright (C) Oracle Corporation. +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) +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) diff --git a/shared/workshops/adb-datastudio/using-avs/create-hierarchy/images/add-hierarchy-sources-1.png b/shared/workshops/adb-datastudio/using-avs/create-hierarchy/images/add-hierarchy-sources-1.png index 610853f4..6adf35ee 100644 Binary files a/shared/workshops/adb-datastudio/using-avs/create-hierarchy/images/add-hierarchy-sources-1.png and b/shared/workshops/adb-datastudio/using-avs/create-hierarchy/images/add-hierarchy-sources-1.png differ diff --git a/shared/workshops/adb-datastudio/using-avs/create-hierarchy/images/add-quarter-level.png b/shared/workshops/adb-datastudio/using-avs/create-hierarchy/images/add-quarter-level.png index 189cfba9..2aa534cd 100644 Binary files a/shared/workshops/adb-datastudio/using-avs/create-hierarchy/images/add-quarter-level.png and b/shared/workshops/adb-datastudio/using-avs/create-hierarchy/images/add-quarter-level.png differ diff --git a/shared/workshops/adb-datastudio/using-avs/create-hierarchy/images/add-time-dim-hier-source.png b/shared/workshops/adb-datastudio/using-avs/create-hierarchy/images/add-time-dim-hier-source.png index b3074f6e..b2c0516b 100644 Binary files a/shared/workshops/adb-datastudio/using-avs/create-hierarchy/images/add-time-dim-hier-source.png and b/shared/workshops/adb-datastudio/using-avs/create-hierarchy/images/add-time-dim-hier-source.png differ diff --git a/shared/workshops/adb-datastudio/using-avs/create-hierarchy/images/add-time-hierarchy.png b/shared/workshops/adb-datastudio/using-avs/create-hierarchy/images/add-time-hierarchy.png index 37ae50d3..6af83e73 100644 Binary files a/shared/workshops/adb-datastudio/using-avs/create-hierarchy/images/add-time-hierarchy.png and b/shared/workshops/adb-datastudio/using-avs/create-hierarchy/images/add-time-hierarchy.png differ diff --git a/shared/workshops/adb-datastudio/using-avs/create-hierarchy/images/all-time-levels-sorted.png b/shared/workshops/adb-datastudio/using-avs/create-hierarchy/images/all-time-levels-sorted.png deleted file mode 100644 index e5816f4c..00000000 Binary files a/shared/workshops/adb-datastudio/using-avs/create-hierarchy/images/all-time-levels-sorted.png and /dev/null differ diff --git a/shared/workshops/adb-datastudio/using-avs/create-hierarchy/images/all-time-levels.png b/shared/workshops/adb-datastudio/using-avs/create-hierarchy/images/all-time-levels.png new file mode 100644 index 00000000..aa619cec Binary files /dev/null and b/shared/workshops/adb-datastudio/using-avs/create-hierarchy/images/all-time-levels.png differ diff --git a/shared/workshops/adb-datastudio/using-avs/create-hierarchy/images/data-sources-1.png b/shared/workshops/adb-datastudio/using-avs/create-hierarchy/images/data-sources-1.png deleted file mode 100644 index bc8a84c5..00000000 Binary files a/shared/workshops/adb-datastudio/using-avs/create-hierarchy/images/data-sources-1.png and /dev/null differ diff --git a/shared/workshops/adb-datastudio/using-avs/create-hierarchy/images/data-sources.png b/shared/workshops/adb-datastudio/using-avs/create-hierarchy/images/data-sources.png index 11445065..344b98a5 100644 Binary files a/shared/workshops/adb-datastudio/using-avs/create-hierarchy/images/data-sources.png and b/shared/workshops/adb-datastudio/using-avs/create-hierarchy/images/data-sources.png differ diff --git a/shared/workshops/adb-datastudio/using-avs/create-hierarchy/images/new-time-hierarchy.png b/shared/workshops/adb-datastudio/using-avs/create-hierarchy/images/new-time-hierarchy.png deleted file mode 100644 index 26c6d6f3..00000000 Binary files a/shared/workshops/adb-datastudio/using-avs/create-hierarchy/images/new-time-hierarchy.png and /dev/null differ diff --git a/shared/workshops/adb-datastudio/using-avs/create-hierarchy/images/press-preview.png b/shared/workshops/adb-datastudio/using-avs/create-hierarchy/images/press-preview.png new file mode 100644 index 00000000..887cc30f Binary files /dev/null and b/shared/workshops/adb-datastudio/using-avs/create-hierarchy/images/press-preview.png differ diff --git a/shared/workshops/adb-datastudio/using-avs/create-hierarchy/images/preview-data-button.png b/shared/workshops/adb-datastudio/using-avs/create-hierarchy/images/preview-data-button.png deleted file mode 100644 index 118cfbea..00000000 Binary files a/shared/workshops/adb-datastudio/using-avs/create-hierarchy/images/preview-data-button.png and /dev/null differ diff --git a/shared/workshops/adb-datastudio/using-avs/create-hierarchy/images/preview-time-table.png b/shared/workshops/adb-datastudio/using-avs/create-hierarchy/images/preview-time-table.png index 28625f29..9c6bc292 100644 Binary files a/shared/workshops/adb-datastudio/using-avs/create-hierarchy/images/preview-time-table.png and b/shared/workshops/adb-datastudio/using-avs/create-hierarchy/images/preview-time-table.png differ diff --git a/shared/workshops/adb-datastudio/using-avs/create-hierarchy/images/rename-hier-to-time.png b/shared/workshops/adb-datastudio/using-avs/create-hierarchy/images/rename-hier-to-time.png index ae9652b5..4dfe78b1 100644 Binary files a/shared/workshops/adb-datastudio/using-avs/create-hierarchy/images/rename-hier-to-time.png and b/shared/workshops/adb-datastudio/using-avs/create-hierarchy/images/rename-hier-to-time.png differ diff --git a/shared/workshops/adb-datastudio/using-avs/create-hierarchy/images/year-level-properties.png b/shared/workshops/adb-datastudio/using-avs/create-hierarchy/images/year-level-properties.png index af76e5e7..2d68fcc8 100644 Binary files a/shared/workshops/adb-datastudio/using-avs/create-hierarchy/images/year-level-properties.png and b/shared/workshops/adb-datastudio/using-avs/create-hierarchy/images/year-level-properties.png differ diff --git a/shared/workshops/adb-datastudio/using-avs/create-join/create-join.md b/shared/workshops/adb-datastudio/using-avs/create-join/create-join.md index 3e3cf568..32c6fbb7 100644 --- a/shared/workshops/adb-datastudio/using-avs/create-join/create-join.md +++ b/shared/workshops/adb-datastudio/using-avs/create-join/create-join.md @@ -1,37 +1,43 @@ - # Define Joins ## Introduction -Congratulations, you are more than halfway to your first Analytic View. You have a fact table and a hierarchy, now you just need to specify the join between the hierarchy table and fact table, and add at least one measure. +You're more than halfway to building your first Analytic View. +You’ve created a fact table and a hierarchy. Now you’ll join them and add a measure. -Estimated Time: Less than 5 minutes. +**Estimated Time: Less than 5 minutes** ### Objectives -In this lab you will: +You will: - Join the hierarchy to the fact table. -### Prerequisites: +### Prerequisites - Complete the previous lab. ## Task 1 - View the DDL -If you press the **Show DDL** button the tool will let you know that these elements are missing. +Click the **Show DDL** button. +You’ll see a message that a join is missing. ![Missing Join](images/missing-join.png) ## Task 2 - Specify the Join -When hierarchies are mapped to dimension (hierarchy) tables rather than directly to the fact table, the hierarchy must be joined (matched) to the fact table. This is just as dimension and fact tables must be *joined* in a SQL query. +When a hierarchy comes from a separate table, it must be joined to the fact table—just like a regular SQL join between a dimension and a fact table. + +Analytic Views manage these joins in metadata. This means: -Analytic views and hierarchies are separate objects in the Database. Joining the hierarchy to the analytic view allows the analytic view to reference (use) the hierarchy. Because the joins are specified in the analytic views, joined are not needed in queries that SELECT from the analytic view. This is one of the features of the analytic view that make it easy to query. +- You only define the join once. +- Queries on the Analytic View do **not** require JOIN clauses. -With an Analytic View, the join is part of the metadata. As a result, joins are not required in queries that SELECT from an Analytic View. +To define the join: -1. Choose **Data Sources** and select **DAY\_ID** for both the **Hierarchy Column** and the **MOVIE\_SALES\_FACT** Fact Column. +1. Go to **Data Sources**. +2. Set **Hierarchy Column** to `DAY_ID`. +3. Set **Fact Column** (from `MOVIE_SALES_FACT`) to `DAY_ID`. ![Join Time Dim](images/join-time-dim.png) @@ -39,15 +45,11 @@ You may now **proceed to the next lab** ## Acknowledgements -- Created By/Date - William (Bud) Endress, Product Manager, Autonomous Database, February 2023 -- Last Updated By - William (Bud) Endress, May 2024 +- **Created By** - William (Bud) Endress, Product Manager, Autonomous Database, February 2023 +- **Last Updated By** - William (Bud) Endress, June 2025 Data about movies in this workshop were sourced from **Wikipedia**. -Copyright (C) Oracle Corporation. +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) \ No newline at end of file +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) diff --git a/shared/workshops/adb-datastudio/using-avs/create-join/images/join-time-dim.png b/shared/workshops/adb-datastudio/using-avs/create-join/images/join-time-dim.png index 74e1899c..0277c970 100644 Binary files a/shared/workshops/adb-datastudio/using-avs/create-join/images/join-time-dim.png and b/shared/workshops/adb-datastudio/using-avs/create-join/images/join-time-dim.png differ diff --git a/shared/workshops/adb-datastudio/using-avs/create-join/images/missing-join.png b/shared/workshops/adb-datastudio/using-avs/create-join/images/missing-join.png index 66954152..339e4417 100644 Binary files a/shared/workshops/adb-datastudio/using-avs/create-join/images/missing-join.png and b/shared/workshops/adb-datastudio/using-avs/create-join/images/missing-join.png differ diff --git a/shared/workshops/adb-datastudio/using-avs/create-measure/create-measure.md b/shared/workshops/adb-datastudio/using-avs/create-measure/create-measure.md index d602cc6f..8d183c0e 100644 --- a/shared/workshops/adb-datastudio/using-avs/create-measure/create-measure.md +++ b/shared/workshops/adb-datastudio/using-avs/create-measure/create-measure.md @@ -2,79 +2,73 @@ ## Introduction -You are almost ready to create the Analytic View! However, at least one measure is required. +You're almost ready to create the Analytic View. +Every Analytic View must have at least one measure. -Estimated Time: 10 minutes. +**Estimated Time: 10 minutes** ### Objectives -In this lab you will: +You will: -- Create a database user. +- Create measures for the Analytic View. -### Prerequisites: +### Prerequisites -- Create measures in the Analytic View. +- Complete the previous lab. ## Task 1 - Create a Fact Measure -Measures come from the fact table. +Measures are created from the fact table. -1. Choose **Measures**. -2. Choose **Add Measures**. -3. Select **SALES**. +1. Go to **Measures**. +2. Click **Add Measures**. +3. Select the **SALES** column. -![Create Sales Measure](images/create-sales-measure.png) + ![Create Sales Measure](images/create-sales-measure.png) -The analytic view now has a measure. +The **SALES** measure is now added to the Analytic View. -![Create Sales Measure](images/sales-measure.png) - -4. Press the Show DDL button. - -The tool can generate all the SQL DDL needed to create the Attribute Dimension Hierarchy and Analytic View. Aren’t you happy that you don’t have to type that yourself? - -![Show DDL](images/show-ddl-1.png) + ![Create Sales Measure](images/sales-measure.png) ## Task 2 - Create Additional Fact Measures -Before creating the analytic view, add some additional measures. Repeating the same steps as you did with SALES, close the Show DDL dialog and: +Add more measures: -1. Add measure QUANTITY. -2. Add measure DISCOUNT_PERCENT. +1. Close the DDL dialog. +2. Add **QUANTITY**. +3. Add **DISCOUNT_PERCENT**. -By default, the aggregation expression is SUM. For measures such as SALES and QUANTITY, it makes sense that those measures would be aggregated by SUM. +By default, all measures use **SUM** as the aggregation method, which is usually correct for quantities and sales. -![Show Measures](images/measures-1.png) + ![Show Measures](images/measures-1.png) ## Task 3 - Change Aggregation Method of Discount Percent -Does it make sense to aggregate DISCOUNT\_PERCENT by SUM? Probably not. It rarely makes sense to aggregate percentages by SUM because ratios usually need to be calculated at the level of aggregation that is being reported on. In this case, we can aggregate DISCOUNT_PERCENT using AVERAGE. - -1. Select the DISCOUNT_PERCENT MEASURE in the tree control. -2. Change the Expression for DISCOUNT_PERCENT to AVG. +Summing percentages rarely makes sense. For `DISCOUNT_PERCENT`, use **AVG** instead. -![Discount Percent Avg](images/discount-pct-avg.png) +1. Select the **DISCOUNT_PERCENT** measure. +2. Change the **Expression** to `AVG`. -**Pro-tip:** It rarely makes sense to SUM ratios such as percentages. For example, you would not SUM the percent change in sales from a prior period. Most ratios should be calculated at the same level of aggregation as being reporting on. For example, the percent change in sales for the current year as compared to the prior year should be calculated using year-level sales values. That is SUM(sales) / SUM(sales prior period). + ![Discount Percent Avg](images/discount-pct-avg.png) -In the case of the Discount Percent measure, we can average because each row represents a single sale (quantity = 1). We also need to consider the meaning of 0 and null values. In this data set, there are null values where there is no discount. Therefore, the average of Discount Percent is the average of when a discount was given. If the quantity was anything other than 1, a weighted average would probably be needed. See [Live SQL tutorial Aggregating Data using Weighted Averages in Analytic Views](https://livesql.oracle.com/apex/livesql/file/tutorial_G4EG6JY9E0U6TFT2RCCLT3F1V.html) +**Pro-tip:** Don’t use `SUM` for ratios like percentages or percent changes. +Instead, calculate the ratio at the same aggregation level as the report. +In this dataset, each row represents a single sale (quantity = 1), so **AVG** works. +If the quantity were greater than 1, you might need a **weighted average**. -The bottom line is that you must be thoughtful when aggregating rations using averages. +See: +[Live SQL Tutorial - Aggregating Data using Weighted Averages in Analytic Views](https://livesql.oracle.com/apex/livesql/file/tutorial_G4EG6JY9E0U6TFT2RCCLT3F1V.html) You may now **proceed to the next lab** ## Acknowledgements -- Created By/Date - William (Bud) Endress, Product Manager, Autonomous Database, February 2023 -- Last Updated By - William (Bud) Endress, May 2024 +- **Created By** - William (Bud) Endress, Product Manager, Autonomous Database, February 2023 +- **Last Updated By** - William (Bud) Endress, June 2025 Data about movies in this workshop were sourced from **Wikipedia**. -Copyright (C) Oracle Corporation. +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) +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) diff --git a/shared/workshops/adb-datastudio/using-avs/create-measure/images/create-sales-measure.png b/shared/workshops/adb-datastudio/using-avs/create-measure/images/create-sales-measure.png index 3600f7fd..1eaef718 100644 Binary files a/shared/workshops/adb-datastudio/using-avs/create-measure/images/create-sales-measure.png and b/shared/workshops/adb-datastudio/using-avs/create-measure/images/create-sales-measure.png differ diff --git a/shared/workshops/adb-datastudio/using-avs/create-measure/images/discount-pct-avg.png b/shared/workshops/adb-datastudio/using-avs/create-measure/images/discount-pct-avg.png index 1388967f..912f8f49 100644 Binary files a/shared/workshops/adb-datastudio/using-avs/create-measure/images/discount-pct-avg.png and b/shared/workshops/adb-datastudio/using-avs/create-measure/images/discount-pct-avg.png differ diff --git a/shared/workshops/adb-datastudio/using-avs/create-measure/images/measures-1.png b/shared/workshops/adb-datastudio/using-avs/create-measure/images/measures-1.png index 1441609c..0087d692 100644 Binary files a/shared/workshops/adb-datastudio/using-avs/create-measure/images/measures-1.png and b/shared/workshops/adb-datastudio/using-avs/create-measure/images/measures-1.png differ diff --git a/shared/workshops/adb-datastudio/using-avs/create-measure/images/sales-measure.png b/shared/workshops/adb-datastudio/using-avs/create-measure/images/sales-measure.png index 7a53be63..ec92e99d 100644 Binary files a/shared/workshops/adb-datastudio/using-avs/create-measure/images/sales-measure.png and b/shared/workshops/adb-datastudio/using-avs/create-measure/images/sales-measure.png differ diff --git a/shared/workshops/adb-datastudio/using-avs/create-measure/images/show-ddl-1.png b/shared/workshops/adb-datastudio/using-avs/create-measure/images/show-ddl-1.png deleted file mode 100644 index f56e3799..00000000 Binary files a/shared/workshops/adb-datastudio/using-avs/create-measure/images/show-ddl-1.png and /dev/null differ diff --git a/shared/workshops/adb-datastudio/using-avs/create-new-av/create-new-av.md b/shared/workshops/adb-datastudio/using-avs/create-new-av/create-new-av.md index 81c401ad..94343e73 100644 --- a/shared/workshops/adb-datastudio/using-avs/create-new-av/create-new-av.md +++ b/shared/workshops/adb-datastudio/using-avs/create-new-av/create-new-av.md @@ -2,71 +2,77 @@ ## Introduction -Analytic Views are a collection of database objects that are used together to present a business model to applications. Analytic Views may be queried with SQL. These objects are: +Analytic Views organize data into a business model that can be queried using SQL. They consist of: -- One or more *Attribute Dimensions* define metadata with attributes and levels, which are the building blocks for hierarchies. -- One or more *Hierarchies*, a type of view with levels and attributes organized to support the selection of data, aggregations, and navigation (e.g., drill down). -- An *Analytic View* that references fact tables, measures, and hierarchies to pull all the data together in a single view. +- **Attribute Dimensions** – define metadata with attributes and levels. +- **Hierarchies** – organize attributes and levels for filtering, aggregation, and drill-down. +- **Analytic View** – combines fact tables, measures, and hierarchies into one queryable view. -These objects are created in the Database using SQL DDL statements. The Data Studio Data Analysis tool creates all these objects for you as a complete system. You do not need to write SQL DDL statements. The tool will show you the DDL statements if you would like to learn the SQL DDL or understand what the tool is doing ‘under the covers’. +In this lab, you will use the Data Studio Data Analysis tool to create all necessary objects automatically. You don’t need to write SQL DDL, but you can view the generated SQL if desired. -To create an Analytic View in this tool, you will: +Steps to create an Analytic View: -- Identify the tables that the Analytic View objects will reference. In this lab, there are two tables, a customer lookup table and a fact table. -- Create hierarchies. When you create hierarchies, the tool will create both an Attribute Dimension object and a Hierarchy View object. -- Create fact measures (measures from the fact table) and calculated measures. The tool will create the Analytic View object for you using this information. +- Identify the source tables (fact and dimension). +- Create hierarchies (the tool will create Attribute Dimensions and Hierarchy Views). +- Define fact and calculated measures (the tool will create the Analytic View). -Estimated Time: 5 minutes. +**Estimated Time: 5 minutes** ### Objectives -In this lab you will: +You will: - Create a new Analytic View. -### Prerequisites: +### Prerequisites - Complete the previous lab. ## Task 1 - Create a New Analytic View -Start the design process by creating a new Analytic View. Depending on how you enter the Data Analysis Application, you might or not see the Create button as shown below. +Begin by creating a new Analytic View. -1. Press the Create button or choose to Create Analytic View from the menu. +1. Click the **Create** button or choose **Create Analytic View** from the menu. -![Create Analytic View](images/create-analytic-view.png) + ![Create Analytic View](images/create-analytic-view.png) -2. Choose the fact table. The fact table contains measures such as Sales or Units Sold. In this example, choose MOVIE\_SALES_FACT. +2. Select the fact table. For this lab, choose MOVIE\_SALES\_FACT. -3. You can view data in the MOVIE\_SALES_FACT table by pressing the Preview Data button. +![Create Analytic View](images/choose-fact-table.png) -4. Press the Close button after you have reviewed the data in the MOVIE\_SALES_FACT table. +3. Click **Preview Data** to view the contents of the MOVIE\_SALES\_FACT table. -5. Enter a user-friendly name in the Caption field. For example, Movie Sales Data. Also enter a Description such as “Daily sales data by customer, and search genre”. +![Preview](images/display-fact-table-preview.png) -**Do not press the Create button yet.** The Analytic View database objects will be created later after you have created hierarchies and measures. +4. After previewing, click **Close**. -**Do not press the Generate Hierarchies and Measures button.** The tool has a feature that can attempt to automatically create hierarchies and measures. In some cases, this might offer a useful head start. In this lab, you will learn how to create hierarchies and measures yourself. Because you know your data best, and you know your business requirements, you will usually create hierarchies and measures as shown in this lab. +5. Enter a friendly name in the **Caption** field (e.g., Movie Sales Data). -You will want to provide user-friendly names to objects in the Analytic View. User-friendly names may be used by an application to represent the Analytic View to end users. User-friendly names are entered into Captions. You may also provide a description of the object in the Description field. +6. Enter a description (e.g., Daily sales data by customer and search genre). -![Choose Fact Table and Preview the Data](images/choose-fact-table.png) +7. **Turn off** Search for Dimension Tables. -You are now off to a good start! +**Do not press the Create button yet.** +You will first define hierarchies and measures. + +**Do not press the Generate Hierarchies and Measures button.** +This feature auto-generates structures but is skipped in this lab so you can learn to create them manually. Knowing your data and business needs helps you build the best model. + +Use the **Caption** and **Description** fields to give user-friendly names and explanations for the Analytic View objects. These names may appear in applications. + + ![Caption and Description](images/enter-caption.png) + +You’re now ready to build the model! You may now **proceed to the next lab** ## Acknowledgements -- Created By/Date - William (Bud) Endress, Product Manager, Autonomous Database, February 2023 -- Last Updated By - William (Bud) Endress, May 2024 +- **Created By** - William (Bud) Endress, Product Manager, Autonomous Database, February 2023 +- **Last Updated By** - William (Bud) Endress, June 2025 Data about movies in this workshop were sourced from **Wikipedia**. -Copyright (C) Oracle Corporation. +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) \ No newline at end of file +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) diff --git a/shared/workshops/adb-datastudio/using-avs/create-new-av/images/choose-fact-table.png b/shared/workshops/adb-datastudio/using-avs/create-new-av/images/choose-fact-table.png index 861a5150..b978bfe2 100644 Binary files a/shared/workshops/adb-datastudio/using-avs/create-new-av/images/choose-fact-table.png and b/shared/workshops/adb-datastudio/using-avs/create-new-av/images/choose-fact-table.png differ diff --git a/shared/workshops/adb-datastudio/using-avs/create-new-av/images/create-analytic-view.png b/shared/workshops/adb-datastudio/using-avs/create-new-av/images/create-analytic-view.png index 1618d8ae..0711ea0c 100644 Binary files a/shared/workshops/adb-datastudio/using-avs/create-new-av/images/create-analytic-view.png and b/shared/workshops/adb-datastudio/using-avs/create-new-av/images/create-analytic-view.png differ diff --git a/shared/workshops/adb-datastudio/using-avs/create-new-av/images/display-fact-table-preview.png b/shared/workshops/adb-datastudio/using-avs/create-new-av/images/display-fact-table-preview.png index 3a0ce2bd..aa0f3d46 100644 Binary files a/shared/workshops/adb-datastudio/using-avs/create-new-av/images/display-fact-table-preview.png and b/shared/workshops/adb-datastudio/using-avs/create-new-av/images/display-fact-table-preview.png differ diff --git a/shared/workshops/adb-datastudio/using-avs/create-new-av/images/enter-caption.png b/shared/workshops/adb-datastudio/using-avs/create-new-av/images/enter-caption.png index 0aaecdc4..e3f35809 100644 Binary files a/shared/workshops/adb-datastudio/using-avs/create-new-av/images/enter-caption.png and b/shared/workshops/adb-datastudio/using-avs/create-new-av/images/enter-caption.png differ diff --git a/shared/workshops/adb-datastudio/using-avs/create-user/create-user.md b/shared/workshops/adb-datastudio/using-avs/create-user/create-user.md index a7e7b75e..c71ee20c 100644 --- a/shared/workshops/adb-datastudio/using-avs/create-user/create-user.md +++ b/shared/workshops/adb-datastudio/using-avs/create-user/create-user.md @@ -2,26 +2,25 @@ ## Introduction -This lab can be run by any database user providing that the user has the required privileges. A user can be created with a few simple commands. - -Estimated Time: Less than 5 minutes. +This lab shows how to create a database user using simple SQL commands. +**Time required: less than 5 minutes.** ### Objectives -In this lab you will: +You will: - Create a database user. -### Prerequisites: +### Prerequisites - Complete the previous lab. ## Task 1 - Create Database User -To create the database user for this lab. +Follow these steps: -1. Using SQL Worksheet, connect to the database using the **ADMIN** user. -2. Run the following commands. You may make substitutions for the username and password. +1. Open SQL Worksheet and connect as **ADMIN**. +2. Run the following commands (you may change the username and password): ~~~SQL @@ -34,22 +33,18 @@ END; ~~~ +- `dwrole` is the default role for all users. +- Enabling the schema for ORDS allows access to Database Actions tools. -The DWROLE role is a standard role given to all users. Enabling the user (schema) for ORDS allows that user to access the Database Actions tools. - -You may now **proceed to the next lab** +You can now **proceed to the next lab**. ## Acknowledgements -- Created By/Date - William (Bud) Endress, Product Manager, Autonomous Database, February 2023 -- Last Updated By - William (Bud) Endress, May 2024 +- **Created By** - William (Bud) Endress, Product Manager, Autonomous Database, February 2023 +- **Last Updated By** - William (Bud) Endress, June 2025 Data about movies in this workshop were sourced from **Wikipedia**. -Copyright (C) Oracle Corporation. +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) +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) diff --git a/shared/workshops/adb-datastudio/using-avs/deploy-av/deploy-av.md b/shared/workshops/adb-datastudio/using-avs/deploy-av/deploy-av.md index 0d6d7e8f..3b267b72 100644 --- a/shared/workshops/adb-datastudio/using-avs/deploy-av/deploy-av.md +++ b/shared/workshops/adb-datastudio/using-avs/deploy-av/deploy-av.md @@ -2,67 +2,66 @@ ## Introduction -Your Analytic View definition now includes one hierarchy, joined to the fact table, and a measure. The Analytic View can be created in the database and you can view data through the Analytic View. +Your Analytic View now includes a hierarchy, join, and measures. +You’re ready to create the database objects and start analyzing data. -Estimated Time: Less than 10 minutes. +**Estimated Time: Less than 10 minutes** ### Objectives -In this lab you will: +You will: - Create the Analytic View objects in the Database. -### Prerequisites: +### Prerequisites - Complete the previous lab. -## Task 1 - Creating the Analytic View Database Object +## Task 1 - Create the Analytic View -You've worked hard to define your first analytic view (well, not really, because the tool makes it easy). Give that Create button a good smash! +Now it’s time to deploy your Analytic View. -1. Press the **Create** button. +1. Click the **Create** button. -Congratulations, you now have an analytic view deployed in the database! There is also an Attribute Dimension and Hierarchy. +![Press Create](images/press-create.png) -The Analysis tool will automatically switch out of the Analytic View design to the Data Quality tab. This tab will let you know if there are certain types of errors found in the tables. Since this is a Live Lab, there are no errors! +The Analytic View, along with its Attribute Dimension and Hierarchy, is now created in the database. -![Data Quality Tab](images/data-quality-tab-1.png) +![New AV](images/new-av.png) ## Task 2 - Review Data in the Analytic View -To view the data in the Analytic View, choose the Analyze tab and define a query in a report or graph. +1. Click on the analytic view name or press the **Analyze** button. -1. Choose the **Analyze** tab. +The tool will auto-generate a simple report using the **Year** level and the **Sales** measure. -The application chooses a level (Year in this case) and a measure (Sales) and displays a report. + ![Analyze Tab](images/go-to-analyze.png) -![Analyze Tab](images/analyze-tab-1.png) +2. Click the **Bar Chart** icon in the upper-right corner to switch to chart view. -2. Switch to a chart by pressing the **bar chart** button in the upper, right corner of the application. + ![Chart Button](images/chart-button.png) -![Chart Button](images/chart-button.png) +3. Click thew **Expand** icon to enlarge the chart. -A bar chart with Years is displayed. Add **Months** to the Chart. + ![Expand Button](images/enlarge-chart.png) -3. Expand the **Time** hierarchy, select **Month**, and drag it under **Year** in the **X-Axis** position. +3. To view **Months** within **Years**: + - Expand the **Time** hierarchy. + - Drag **Month** below **Year** on the X-axis. -The chart now displays Month within Year. + ![Move month to x-axis](images/month-to-x-axis.png) -![Move month to x-axis](images/month-to-x-axis.png) +The chart now shows Sales by Month within Year. You may now **proceed to the next lab** ## Acknowledgements -- Created By/Date - William (Bud) Endress, Product Manager, Autonomous Database, February 2023 -- Last Updated By - William (Bud) Endress, May 2024 +- **Created By** - William (Bud) Endress, Product Manager, Autonomous Database, February 2023 +- **Last Updated By** - William (Bud) Endress, June 20252025 Data about movies in this workshop were sourced from **Wikipedia**. -Copyright (C) Oracle Corporation. +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) +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) diff --git a/shared/workshops/adb-datastudio/using-avs/deploy-av/images/chart-button.png b/shared/workshops/adb-datastudio/using-avs/deploy-av/images/chart-button.png index 035040c5..dc757af1 100644 Binary files a/shared/workshops/adb-datastudio/using-avs/deploy-av/images/chart-button.png and b/shared/workshops/adb-datastudio/using-avs/deploy-av/images/chart-button.png differ diff --git a/shared/workshops/adb-datastudio/using-avs/deploy-av/images/data-quality-tab-1.png b/shared/workshops/adb-datastudio/using-avs/deploy-av/images/data-quality-tab-1.png deleted file mode 100644 index 8449136d..00000000 Binary files a/shared/workshops/adb-datastudio/using-avs/deploy-av/images/data-quality-tab-1.png and /dev/null differ diff --git a/shared/workshops/adb-datastudio/using-avs/deploy-av/images/enlarge-chart.png b/shared/workshops/adb-datastudio/using-avs/deploy-av/images/enlarge-chart.png new file mode 100644 index 00000000..25d8df86 Binary files /dev/null and b/shared/workshops/adb-datastudio/using-avs/deploy-av/images/enlarge-chart.png differ diff --git a/shared/workshops/adb-datastudio/using-avs/deploy-av/images/go-to-analyze.png b/shared/workshops/adb-datastudio/using-avs/deploy-av/images/go-to-analyze.png new file mode 100644 index 00000000..6b8c6f8e Binary files /dev/null and b/shared/workshops/adb-datastudio/using-avs/deploy-av/images/go-to-analyze.png differ diff --git a/shared/workshops/adb-datastudio/using-avs/deploy-av/images/month-to-x-axis.png b/shared/workshops/adb-datastudio/using-avs/deploy-av/images/month-to-x-axis.png index 4a89dd4d..b4ac3d48 100644 Binary files a/shared/workshops/adb-datastudio/using-avs/deploy-av/images/month-to-x-axis.png and b/shared/workshops/adb-datastudio/using-avs/deploy-av/images/month-to-x-axis.png differ diff --git a/shared/workshops/adb-datastudio/using-avs/deploy-av/images/new-av.png b/shared/workshops/adb-datastudio/using-avs/deploy-av/images/new-av.png new file mode 100644 index 00000000..b1d7316b Binary files /dev/null and b/shared/workshops/adb-datastudio/using-avs/deploy-av/images/new-av.png differ diff --git a/shared/workshops/adb-datastudio/using-avs/deploy-av/images/press-create.png b/shared/workshops/adb-datastudio/using-avs/deploy-av/images/press-create.png new file mode 100644 index 00000000..acc7c820 Binary files /dev/null and b/shared/workshops/adb-datastudio/using-avs/deploy-av/images/press-create.png differ diff --git a/shared/workshops/adb-datastudio/using-avs/explore-data/explore-data.md b/shared/workshops/adb-datastudio/using-avs/explore-data/explore-data.md index 8ca73cb2..63a770f5 100644 --- a/shared/workshops/adb-datastudio/using-avs/explore-data/explore-data.md +++ b/shared/workshops/adb-datastudio/using-avs/explore-data/explore-data.md @@ -2,67 +2,76 @@ ## Introduction -The Analytic View now has several hierarchies and a time series -calculation. It will be more interesting to analyze with this additional content. +Your Analytic View now includes multiple hierarchies and a time-based calculation. +It’s ready for deeper analysis. -Estimated Time: 5 Minutes. +**Estimated Time: 5 minutes** ### Objectives -In this lab you will: +You will: -- Use the Analysis Viewer tool to explore data in the Analytic View. +- Explore data using the Analysis Viewer tool. -### Prerequisites: +### Prerequisites - Complete the previous lab. ## Task 1 - Create a New Report -The application will return to the Data Quality tab after the analytic -view has been updated. As before, there are no errors. +After updating the Analytic View, the tool returns to the **Analysis Viewer**. -1. Choose the **Analyze** tab. -2. Choose the **Report** icon (be sure to choose the middle icon). +1. Click the **Add Report** button. -![Format Measure](images/report-1.png) + ![New report](images/new-report.png) -3. Expand the Time hierarchy and move **MONTH** to the **Columns** - position. -4. Expand Measures and add **SALES\_PCT\_CHG\_PRIOR\_PERIOD** to the - **Values** position. -5. When prompted, choose Format Type **Percentage** and **Save**. +2. Click the **Expand** icon. -The first month has Sales data, but because it is the first month the -prior period values are null. + ![Format Measure](images/expand-report.png) -7. Scroll the report to the right to see prior period values. + The expanded report. -![Report Prior Period](images/report-2.png) + ![Format Measure](images/expanded-report.png) -8. Break the data out by Search Genre by dragging Genre under Continent in -the Row position. +3. Expand the **Time** hierarchy. Drag **MONTH** to the **Columns** section. +4. Expand the **Geography** hierarchy. Drag **Continent** to **Rows** under **Genre Name**. +4. Expand **Measures**. Drag **SALES\_PCT\_CHG\_PRIOR\_PERIOD** to **Values**. -![Report Prior Period](images/report-3.png) +The first month has no prior period data, so values are null. +Scroll right to view later months. + + ![Report Prior Period](images/report-2.png) + +6. Format SALES\_PERCENT\_CHANGE\_PRIOR\_PERIOD as a percentage. + + - Double-click **SALES\_PERCENT\_CHANGE\_PRIOR\_PERIOD**. + - Set **Format Type** to **Percentage**. + - Press **Save**. + + ![Set to percentage](images/set-to-percentage.png) + +The report is complete. + + ![Formatted Report](images/formatted-report.png) ## Task 2 - Explore On Your Own -Feel free to add new calculations and explore the data on your own. -After all, that's what this is all about. +You can now: + +- Add more calculations +- Explore the data using different views + +This is a great way to understand how your analytic model performs. You may now **proceed to the next lab** ## Acknowledgements -- Created By/Date - William (Bud) Endress, Product Manager, Autonomous Database, February 2023 -- Last Updated By - William (Bud) Endress, May 2024 +- **Created By** - William (Bud) Endress, Product Manager, Autonomous Database, February 2023 +- **Last Updated By** - William (Bud) Endress, June 2025 Data about movies in this workshop were sourced from **Wikipedia**. -Copyright (C) Oracle Corporation. +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) +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) diff --git a/shared/workshops/adb-datastudio/using-avs/explore-data/images/expand-report.png b/shared/workshops/adb-datastudio/using-avs/explore-data/images/expand-report.png new file mode 100644 index 00000000..3dd3a3f7 Binary files /dev/null and b/shared/workshops/adb-datastudio/using-avs/explore-data/images/expand-report.png differ diff --git a/shared/workshops/adb-datastudio/using-avs/explore-data/images/expanded-report.png b/shared/workshops/adb-datastudio/using-avs/explore-data/images/expanded-report.png new file mode 100644 index 00000000..f8de2bd2 Binary files /dev/null and b/shared/workshops/adb-datastudio/using-avs/explore-data/images/expanded-report.png differ diff --git a/shared/workshops/adb-datastudio/using-avs/explore-data/images/format-measure.png b/shared/workshops/adb-datastudio/using-avs/explore-data/images/format-measure.png deleted file mode 100644 index aec0aee0..00000000 Binary files a/shared/workshops/adb-datastudio/using-avs/explore-data/images/format-measure.png and /dev/null differ diff --git a/shared/workshops/adb-datastudio/using-avs/explore-data/images/formatted-report.png b/shared/workshops/adb-datastudio/using-avs/explore-data/images/formatted-report.png new file mode 100644 index 00000000..27d6f615 Binary files /dev/null and b/shared/workshops/adb-datastudio/using-avs/explore-data/images/formatted-report.png differ diff --git a/shared/workshops/adb-datastudio/using-avs/explore-data/images/new-report.png b/shared/workshops/adb-datastudio/using-avs/explore-data/images/new-report.png new file mode 100644 index 00000000..04715777 Binary files /dev/null and b/shared/workshops/adb-datastudio/using-avs/explore-data/images/new-report.png differ diff --git a/shared/workshops/adb-datastudio/using-avs/explore-data/images/report-1.png b/shared/workshops/adb-datastudio/using-avs/explore-data/images/report-1.png deleted file mode 100644 index 983ab562..00000000 Binary files a/shared/workshops/adb-datastudio/using-avs/explore-data/images/report-1.png and /dev/null differ diff --git a/shared/workshops/adb-datastudio/using-avs/explore-data/images/report-2.png b/shared/workshops/adb-datastudio/using-avs/explore-data/images/report-2.png index 0b1b6f8a..94a8dad1 100644 Binary files a/shared/workshops/adb-datastudio/using-avs/explore-data/images/report-2.png and b/shared/workshops/adb-datastudio/using-avs/explore-data/images/report-2.png differ diff --git a/shared/workshops/adb-datastudio/using-avs/explore-data/images/set-to-percentage.png b/shared/workshops/adb-datastudio/using-avs/explore-data/images/set-to-percentage.png new file mode 100644 index 00000000..5b344ee3 Binary files /dev/null and b/shared/workshops/adb-datastudio/using-avs/explore-data/images/set-to-percentage.png differ diff --git a/shared/workshops/adb-datastudio/using-avs/images_OLD/x-all-time-levels.png b/shared/workshops/adb-datastudio/using-avs/images_OLD/x-all-time-levels.png deleted file mode 100644 index 28a79031..00000000 Binary files a/shared/workshops/adb-datastudio/using-avs/images_OLD/x-all-time-levels.png and /dev/null differ diff --git a/shared/workshops/adb-datastudio/using-avs/images_OLD/x-view-bar-chart-1.png b/shared/workshops/adb-datastudio/using-avs/images_OLD/x-view-bar-chart-1.png deleted file mode 100644 index 9c9b01ea..00000000 Binary files a/shared/workshops/adb-datastudio/using-avs/images_OLD/x-view-bar-chart-1.png and /dev/null differ diff --git a/shared/workshops/adb-datastudio/using-avs/install-sample-data/install-sample-data.md b/shared/workshops/adb-datastudio/using-avs/install-sample-data/install-sample-data.md index 844dce05..21f6ddf0 100644 --- a/shared/workshops/adb-datastudio/using-avs/install-sample-data/install-sample-data.md +++ b/shared/workshops/adb-datastudio/using-avs/install-sample-data/install-sample-data.md @@ -2,29 +2,24 @@ ## Introduction -This lab uses sample data that is loaded into the Autonomous Database from Oracle Cloud Infrastructure Object Store. You will create four tables and load data from Object Storage using the DBMS\_CLOUD.COPY\_DATA procedure. - -Estimated Time: 10 minutes with 1 ocpu. +This lab installs sample data by creating four tables and loading data from Oracle Cloud Infrastructure Object Store using `DBMS_CLOUD.COPY_DATA`. +**Estimated time: 10 minutes with 1 OCPU** ### Objectives -In this lab you will: +You will: - Install sample data. -### Prerequisites: +### Prerequisites - Complete the previous lab. -**Author's note. Before publication, replace PAR with PAR to final bucket.** ## Task 1 - Load Sample Data -To load sample data in this lab. - -1. Using SQL Worksheet, connect to the database using the **MOVIESTREAM** (or other) user created in Lab 3. -2. Run the following commands in SQL Worksheet. They can be run all at once as a script or individually, as you prefer. - +1. Connect to the database using the **MOVIESTREAM** user (created in Lab 3). +2. Run the commands below in SQL Worksheet — either as a single script or one at a time. ~~~SQL @@ -115,10 +110,9 @@ END; ~~~ - ## Task 2 - Confirm That Data is Loaded -You can view using in the tables you just created using the following commands in SQL Worksheet. +Run the following queries in SQL Worksheet to confirm the tables were loaded: ~~~SQL @@ -132,19 +126,15 @@ SELECT * FROM movie_sales_fact; ~~~ -You may now **proceed to the next lab** +You may now **proceed to the next lab**. ## Acknowledgements -- Created By/Date - William (Bud) Endress, Product Manager, Autonomous Database, February 2023 -- Last Updated By - William (Bud) Endress, May 2024 +- **Created By** - William (Bud) Endress, Product Manager, Autonomous Database, February 2023 +- **Last Updated By** - William (Bud) Endress, June 2025 Data about movies in this workshop were sourced from **Wikipedia**. -Copyright (C) Oracle Corporation. +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) \ No newline at end of file +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) diff --git a/shared/workshops/adb-datastudio/using-avs/introduction/introduction.md b/shared/workshops/adb-datastudio/using-avs/introduction/introduction.md index f613ff66..3c9d5e0c 100644 --- a/shared/workshops/adb-datastudio/using-avs/introduction/introduction.md +++ b/shared/workshops/adb-datastudio/using-avs/introduction/introduction.md @@ -1,52 +1,47 @@ # Introduction -## About This Workshop +## Workshop Overview -This workshop introduces creating Analytic Views in Oracle Autonomous Database Using the Data Studio Analysis application. This Live Lab is designed to be short and approachable. +This workshop shows you how to create **Analytic Views** in **Oracle Autonomous Database** using the **Data Studio Analysis** tool. It's designed to be short, simple, and beginner-friendly. -The Analytic View that you will design is simple and easy to understand. It introduces the business model and key features. You will also use the Analysis tool to view your Analytic View and verify the design. +You’ll build a basic Analytic View that introduces the business model and key features. You'll also use the Analysis tool to view and verify your design. -The Data Studio Analysis tool generates all the DDL needed to create Analytic Views. You can view the DDL in the tool. If you would like to look more closely at Analytic View DDL, consider running the **[Oracle Live SQL Tutorial Creating Analytic Views – Getting Started tutorial](https://livesql.oracle.com/apex/livesql/file/tutorial_EDVE861IID1QUD1NIUPU5ALEW.html)**. +Data Studio generates all the DDL required to create an Analytic View. You can review the DDL in the tool. For a deeper dive, explore the [**Oracle Live SQL: Creating Analytic Views – Getting Started**](https://livesql.oracle.com/apex/livesql/file/tutorial_EDVE861IID1QUD1NIUPU5ALEW.html) tutorial. -### About Analytic Views +## What Is an Analytic View? -An Analytic View is a type of view in the Oracle Database that allows users to perform complex queries and calculations on data stored in one or more tables. These views provide a higher level of abstraction over the underlying data, allowing users to access and analyze the data in a more meaningful way. They are typically used in business intelligence and data warehousing applications. For the application developers, analytic views can simplify SQL generation and calculation expressions. +An **Analytic View** is a database object that simplifies complex queries and calculations across one or more tables. It provides a semantic layer for easier analysis and is ideal for business intelligence and data warehousing. Developers benefit from simpler SQL and built-in support for calculations. -### Objectives +## Workshop Objectives -In this workshop, you will: +In this lab, you will: -- Learn how to quickly create a simple Analytic View using the Data Studio Analysis application. -- Learn about the main features of the analytic view. -- Create dimensions, hierarchies, and fact measures. -- Add calculated measures. -- View the analytic view in the Data Studio Analysis application. +- Quickly create a simple Analytic View using Data Studio +- Learn the core features of Analytic Views +- Define dimensions, hierarchies, and fact measures +- Add calculated measures +- View and verify your Analytic View design in Data Studio -### About the Data +## Sample Data -The data set used in this Live Lab is a variation of the MovieStream data set used by many other Autonomous Database labs. MovieStream is a fictitious video streaming service. The version of the data set used by this lab is highly simplified to allow you to focus on the core aspects of designing an Analytic View. It supports the analysis of sales data by time, geography, and genre used when searching for movies. +The lab uses a simplified version of the **MovieStream** dataset—a fictional video streaming service. The dataset focuses on core concepts and supports sales analysis by time, geography, and genre. -### Prerequisites +## Prerequisites -Before you launch into this workshop, you will need the following: +To complete this workshop, you should have: -1. Basic knowledge of Oracle Cloud -2. Basic level of understanding of SQL query language +1. Basic knowledge of Oracle Cloud +2. Basic understanding of SQL -If you have any questions about the topics covered in this lab and the entire workshop, please contact us by posting on our public forum on **[cloudcustomerconnect.oracle.com](https://cloudcustomerconnect.oracle.com/resources/32a53f8587/)** and we will respond as soon as possible. +If you have questions, please post them on our [**Oracle Cloud Customer Connect forum**](https://cloudcustomerconnect.oracle.com/resources/32a53f8587/) and we’ll respond promptly. -### Acknowledgements +## Acknowledgements -- Created By/Date - William (Bud) Endress, Product Manager, Autonomous Database, February 2023 -- Special thanks to Mike Matthews, ADB Product Management, for his excellent editing. -- Last Updated By - William (Bud) Endress, May 2024 +- **Created By** - William (Bud) Endress, Product Manager, Autonomous Database, February 2023 +- **Last Updated By** - William (Bud) Endress, June 2025 Data about movies in this workshop were sourced from **Wikipedia**. -Copyright (C) Oracle Corporation. +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) \ No newline at end of file +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) diff --git a/shared/workshops/adb-datastudio/using-avs/launch-analysis-tool/images/adb-console-access-db-actions.png b/shared/workshops/adb-datastudio/using-avs/launch-analysis-tool/images/adb-console-access-db-actions.png deleted file mode 100644 index 2fd68e15..00000000 Binary files a/shared/workshops/adb-datastudio/using-avs/launch-analysis-tool/images/adb-console-access-db-actions.png and /dev/null differ diff --git a/shared/workshops/adb-datastudio/using-avs/launch-analysis-tool/images/db-actions-login.png b/shared/workshops/adb-datastudio/using-avs/launch-analysis-tool/images/db-actions-login.png deleted file mode 100644 index 7e11a1f1..00000000 Binary files a/shared/workshops/adb-datastudio/using-avs/launch-analysis-tool/images/db-actions-login.png and /dev/null differ diff --git a/shared/workshops/adb-datastudio/using-avs/launch-analysis-tool/images/db-actions-logout.png b/shared/workshops/adb-datastudio/using-avs/launch-analysis-tool/images/db-actions-logout.png deleted file mode 100644 index 37d1fd59..00000000 Binary files a/shared/workshops/adb-datastudio/using-avs/launch-analysis-tool/images/db-actions-logout.png and /dev/null differ diff --git a/shared/workshops/adb-datastudio/using-avs/launch-analysis-tool/images/db-actions-logout_OLD.png b/shared/workshops/adb-datastudio/using-avs/launch-analysis-tool/images/db-actions-logout_OLD.png deleted file mode 100644 index 2efb5566..00000000 Binary files a/shared/workshops/adb-datastudio/using-avs/launch-analysis-tool/images/db-actions-logout_OLD.png and /dev/null differ diff --git a/shared/workshops/adb-datastudio/using-avs/launch-analysis-tool/images/hopscotch.png b/shared/workshops/adb-datastudio/using-avs/launch-analysis-tool/images/hopscotch.png deleted file mode 100644 index f925e254..00000000 Binary files a/shared/workshops/adb-datastudio/using-avs/launch-analysis-tool/images/hopscotch.png and /dev/null differ diff --git a/shared/workshops/adb-datastudio/using-avs/launch-analysis-tool/images/open-data-analysis.png b/shared/workshops/adb-datastudio/using-avs/launch-analysis-tool/images/open-data-analysis.png index 22edff09..0c957592 100644 Binary files a/shared/workshops/adb-datastudio/using-avs/launch-analysis-tool/images/open-data-analysis.png and b/shared/workshops/adb-datastudio/using-avs/launch-analysis-tool/images/open-data-analysis.png differ diff --git a/shared/workshops/adb-datastudio/using-avs/launch-analysis-tool/images/rest-data-services.png b/shared/workshops/adb-datastudio/using-avs/launch-analysis-tool/images/rest-data-services.png new file mode 100644 index 00000000..66675dad Binary files /dev/null and b/shared/workshops/adb-datastudio/using-avs/launch-analysis-tool/images/rest-data-services.png differ diff --git a/shared/workshops/adb-datastudio/using-avs/launch-analysis-tool/images/rest-login.png b/shared/workshops/adb-datastudio/using-avs/launch-analysis-tool/images/rest-login.png new file mode 100644 index 00000000..9526bb9b Binary files /dev/null and b/shared/workshops/adb-datastudio/using-avs/launch-analysis-tool/images/rest-login.png differ diff --git a/shared/workshops/adb-datastudio/using-avs/launch-analysis-tool/launch-analysis-tool.md b/shared/workshops/adb-datastudio/using-avs/launch-analysis-tool/launch-analysis-tool.md index ab3d381d..0ce66619 100644 --- a/shared/workshops/adb-datastudio/using-avs/launch-analysis-tool/launch-analysis-tool.md +++ b/shared/workshops/adb-datastudio/using-avs/launch-analysis-tool/launch-analysis-tool.md @@ -2,59 +2,52 @@ ## Introduction -Estimated Time: 10 minutes with 1 ocpu. - -This lab uses the Database Actions Data Studio Analysis tool to design the Analytic view. - -Estimated Time: Less than 5 minutes. +Use the Database Actions Data Studio Analysis tool to design the Analytic View. +**Estimated time: Less than 5 minutes** ### Objectives -In this lab you will: +You will: - Launch the Data Studio Analysis tool. -### Prerequisites: +### Prerequisites - Complete the previous lab. -## Task 1 - Access Database Actions +## Task 1 - Access Database Actions -The Database Actions tools can be accessed directly using a URL or through the Autonomous Database console. +If you are still logged in as the **ADMIN** user, log out and log back in as the **MOVIESTREAM** user and proceed to Step 4. -If you are running this lab in your tenancy and do not have access to the Autonomous Database console, ask the administrator of the database to provide you with the URL. +Othewise, you can access **Database Actions** using the URL of your Autonomous Database instance. The URL will look similar to this: -1. If you have access to the Autonomous Database console, choose Database Actions. + https://xcsvfpwxb7cd9bvet-adppm.adb.uk-london-1.oraclecloudapps.com/ -![Open Database Actions](images/adb-console-access-db-actions.png) +Follow these steps: -2. If you have launched Database Actions from the Autonomous Database console, you are probably logged in as the ADMIN user. Sign out of Database Actions of you are logged in as ADMIN. +1. Access your Autonomous Database using the URL. -![Log out of Database Actions](images/db-actions-logout.png) + ![REST Data Services](images/rest-data-services.png) -3. Sign in as your database user (for example, MOVIESTREAM). +2. Sign in with your database user (e.g., **MOVIESTREAM**). -![Log into Database Actions](images/db-actions-login.png) + ![Log into Database Actions](images/rest-login.png) -4. Open the Data Analysis application. +4. Go to the Data Studio tab and launch the **Data Analysis** application. -The first time you open the Analysis Application, introductory cards might be displayed. You can choose to review the cards or simply close them. + ![Open Data Analysis](images/open-data-analysis.png) -![Open Data Analysis application](images/hopscotch.png) + On first launch, you may see introductory cards. You can review or close them. You may now **proceed to the next lab** ## Acknowledgements -- Created By/Date - William (Bud) Endress, Product Manager, Autonomous Database, February 2023 -- Last Updated By - William (Bud) Endress, May 2024 +- **Created By** - William (Bud) Endress, Product Manager, Autonomous Database, February 2023 +- **Last Updated By** - William (Bud) Endress, June 2025 Data about movies in this workshop were sourced from **Wikipedia**. -Copyright (C) Oracle Corporation. +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) \ No newline at end of file +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) diff --git a/shared/workshops/adb-datastudio/using-avs/learn-more/learn-more.md b/shared/workshops/adb-datastudio/using-avs/learn-more/learn-more.md index 7fc20dab..98faf446 100644 --- a/shared/workshops/adb-datastudio/using-avs/learn-more/learn-more.md +++ b/shared/workshops/adb-datastudio/using-avs/learn-more/learn-more.md @@ -16,15 +16,11 @@ Oracle Analytic Cloud has native support for Analytic Views. Oracle Analytic Clo ## Acknowledgements -- Created By/Date - William (Bud) Endress, Product Manager, Autonomous Database, February 2023 -- Last Updated By - William (Bud) Endress, May 2024 +- **Created By** - William (Bud) Endress, Product Manager, Autonomous Database, February 2023 +- **Last Updated By** - William (Bud) Endress, June 2025 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) +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) diff --git a/shared/workshops/adb-datastudio/using-avs/open-sql-worksheet/images/2-start-sql-worksheet_OLD.png b/shared/workshops/adb-datastudio/using-avs/open-sql-worksheet/images/2-start-sql-worksheet_OLD.png deleted file mode 100644 index a0632639..00000000 Binary files a/shared/workshops/adb-datastudio/using-avs/open-sql-worksheet/images/2-start-sql-worksheet_OLD.png and /dev/null differ diff --git a/shared/workshops/adb-datastudio/using-avs/open-sql-worksheet/images/adb-console-access-db-actions.png b/shared/workshops/adb-datastudio/using-avs/open-sql-worksheet/images/adb-console-access-db-actions.png deleted file mode 100644 index 2fd68e15..00000000 Binary files a/shared/workshops/adb-datastudio/using-avs/open-sql-worksheet/images/adb-console-access-db-actions.png and /dev/null differ diff --git a/shared/workshops/adb-datastudio/using-avs/open-sql-worksheet/images/admin-login.png b/shared/workshops/adb-datastudio/using-avs/open-sql-worksheet/images/admin-login.png new file mode 100644 index 00000000..4074da07 Binary files /dev/null and b/shared/workshops/adb-datastudio/using-avs/open-sql-worksheet/images/admin-login.png differ diff --git a/shared/workshops/adb-datastudio/using-avs/open-sql-worksheet/images/rest-data-services.png b/shared/workshops/adb-datastudio/using-avs/open-sql-worksheet/images/rest-data-services.png new file mode 100644 index 00000000..66675dad Binary files /dev/null and b/shared/workshops/adb-datastudio/using-avs/open-sql-worksheet/images/rest-data-services.png differ diff --git a/shared/workshops/adb-datastudio/using-avs/open-sql-worksheet/images/sql-worksheet.png b/shared/workshops/adb-datastudio/using-avs/open-sql-worksheet/images/sql-worksheet.png new file mode 100644 index 00000000..6de6bf26 Binary files /dev/null and b/shared/workshops/adb-datastudio/using-avs/open-sql-worksheet/images/sql-worksheet.png differ diff --git a/shared/workshops/adb-datastudio/using-avs/open-sql-worksheet/images/start-sql-worksheet.png b/shared/workshops/adb-datastudio/using-avs/open-sql-worksheet/images/start-sql-worksheet.png index ef41b3d2..d5becc32 100644 Binary files a/shared/workshops/adb-datastudio/using-avs/open-sql-worksheet/images/start-sql-worksheet.png and b/shared/workshops/adb-datastudio/using-avs/open-sql-worksheet/images/start-sql-worksheet.png differ diff --git a/shared/workshops/adb-datastudio/using-avs/open-sql-worksheet/open-sql-worksheet.md b/shared/workshops/adb-datastudio/using-avs/open-sql-worksheet/open-sql-worksheet.md index 437d7627..789af764 100644 --- a/shared/workshops/adb-datastudio/using-avs/open-sql-worksheet/open-sql-worksheet.md +++ b/shared/workshops/adb-datastudio/using-avs/open-sql-worksheet/open-sql-worksheet.md @@ -2,51 +2,54 @@ ## Introduction -You will need to connect to Autonomous Database and run SQL commands to create a user, add workshop utilities, and load sample data. This lab provides instructions for connecting to SQL Worksheet using your browser. If you use a different tool such as SQL Developer desktop, you can use that tool. +To complete this lab, you’ll connect to Oracle Autonomous Database and run SQL commands to create a user and load sample data. These steps use the browser-based **SQL Worksheet**. If you prefer, you may use a different tool like **SQL Developer**. -Estimated Time: Less than 5 minutes. +**Estimated Time:** Less than 5 minutes ### Objectives -In this lab you will: +- Open and access SQL Worksheet -- Open SQL Worksheet. +### Prerequisites -### Prerequisites: +- Access to your Autonomous Database using the database URL as the **ADMIN** user. The URL will look similar to this: -- Access to the Autonomous Database Console or a URL to Autonomous Database Actions. + https://xcsvfpwxb7cd9bvet-adppm.adb.uk-london-1.oraclecloudapps.com/ -## Task 1 - Connect to the Database Actions Tool Set +## Task 1 – Login to Autonomous Database -You will use the Data Studio Analysis tool to create your Analytic View. Data Studio is part of the Database Actions tool set, which contains many different types of tools. +Follow these steps: -You can connect to Database Actions using the Autonomous Database Service Console or using a URL provided by your Autonomous Database administrator. +1. Access your Autonomous Database using the URL. -1. If you are connecting via the Autonomous Database Service Console, choose the Database Actions button. +![REST Data Servicews](images/rest-data-services.png) -![Open Database Actions](images/adb-console-access-db-actions.png) +1. Login as the **ADMIN** user. -## Task 2 - Connect to SQL Worksheet + ![ADMIN logtin](images/admin-login.png) -SQL Worksheet allows you to run SQL commands in the Oracle Database. You will run SQL commands to create a database user and load sample data. +## Task 2 – Open SQL Worksheet -1. Choose the SQL button. +You will use SQL Worksheet to run SQL commands needed for the workshop. -![Open SQL Worksheet](images/start-sql-worksheet.png) +1. Select the **Development** tab and click the **SQL** button. -You may now **proceed to the next lab** + ![Open SQL Worksheet](images/start-sql-worksheet.png) -## Acknowledgements +SQL Worksheet will look like this: + +![SQL Worksheet](images/sql-worksheet.png) + +You’re now ready to **proceed to the next lab**. -- Created By/Date - William (Bud) Endress, Product Manager, Autonomous Database, February 2023 -- Last Updated By - William (Bud) Endress, May 2024 +--- + +## Acknowledgements -Data about movies in this workshop were sourced from **Wikipedia**. +- **Created By** - William (Bud) Endress, Product Manager, Autonomous Database, February 2023 +- **Last Updated By** - William (Bud) Endress, June 2025 -Copyright (C) Oracle Corporation. +Movie data in this lab is sourced from **Wikipedia**. -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) \ No newline at end of file +© Oracle Corporation. This content is licensed under the **GNU Free Documentation License v1.3 or later**. +See [GNU Free Documentation License](files/gnu-free-documentation-license.txt) for details.