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

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ Add another new column, rename it to `Month` and set the formula to:
DateTrunc("month", [Date])
```

Let's cull the data down for this demonstration. We don't need 4.5 million rows to build our data app, although Sigma handles it fine anyway. There is no reason to use more data than is required and efficency matters.
Let's cull the data down for this demonstration. We don't need 4.5 million rows to build our data app, although Sigma handles it fine anyway. There is no reason to use more data than is required and efficiency matters.

Filter the table down to just `Mobiles`:

Expand Down Expand Up @@ -176,7 +176,7 @@ We need to change the value in the `When selecting cells in column` to be `Sum o
Once that change is made, click the `+` to add another action.

<aside class="negative">
<strong>NOTE:</strong><br> Adding actions and action sequences is really simple and gets repetitve so we may not show every step. We will show the configurations when they are not obvious.
<strong>NOTE:</strong><br> Adding actions and action sequences is really simple and gets repetitive so we may not show every step. We will show the configurations when they are not obvious.
</aside>

<img src="assets/acl-7.png" width="800"/>
Expand All @@ -199,7 +199,7 @@ To support the required passing of user selected values, we will use a few Sigma
Once the controls are in place, we will return to creating some actions to control the passing of values to them.

<aside class="positive">
<strong>IMPORTANT:</strong><br> Using Actions and Controls together unlocks limitless possibilites to create feature rich data applications extremely quickly.
<strong>IMPORTANT:</strong><br> Using Actions and Controls together unlocks limitless possibilities to create feature rich data applications extremely quickly.
</aside>

On the `Adjustments` modal, add the following controls and text elements.
Expand Down Expand Up @@ -341,7 +341,7 @@ On the `On click - secondary` action, add three actions, two to clear the modals
<strong>NOTE:</strong><br> Clearing all the control values in a container is big time saver!
</aside>

### Primary button (Save Adustment)
### Primary button (Save Adjustment)
We need to handle this button a bit different to account for things that ***might*** happen.

For example, if the user does not enter a value for `A Adjustment` but clicks `Save`, what should happen?
Expand Down Expand Up @@ -397,7 +397,7 @@ Switch([Method], "Percent", [a_current] * (1 + [a_adjustment] / 100), "Absolute"
```

<aside class="negative">
<strong>NOTE:</strong><br> The calculations in the formula above are somwhat unimportant in this demonstration. We just picked something simple to make it understandable. Sigma can handle complex calculations in this same workflow.
<strong>NOTE:</strong><br> The calculations in the formula above are somewhat unimportant in this demonstration. We just picked something simple to make it understandable. Sigma can handle complex calculations in this same workflow.
</aside>

Add another action to `Navigate` back to `Home`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ Add a new column, rename it to `Revenue` and set the formula to:
```code
[Price] * [Quantity]
```
Let's cull the data down for this demonstration. We don't need 4.5 million rows to build our data app, although Sigma handles it fine anyway. There is no reason to use more data than is required and efficency matters.
Let's cull the data down for this demonstration. We don't need 4.5 million rows to build our data app, although Sigma handles it fine anyway. There is no reason to use more data than is required and efficiency matters.

Filter the table down to just `Order Number` and set the range to `131-133`:

Expand Down Expand Up @@ -178,7 +178,7 @@ To support the required passing of user selected values, we will use a few Sigma
Once the controls are in place, we will return to creating some actions to control the passing of values from `Orders to Approve` to the `Adjuster Modal`.

<aside class="positive">
<strong>IMPORTANT:</strong><br> Using actions and controls together unlocks limitless possibilites to create feature rich data applications extremely quickly.
<strong>IMPORTANT:</strong><br> Using actions and controls together unlocks limitless possibilities to create feature rich data applications extremely quickly.
</aside>

We will start by adding a `Controls` > `Text input` control to the modal and setting its `Control ID` to `am-Key`:
Expand All @@ -190,7 +190,7 @@ This will hold the key value that allows us to identify the exact row we are tar
Since this process will be somewhat repetitive, lets make this first one work first before we add the rest.

<aside class="negative">
<strong>NOTE:</strong><br> We dont really need to show the "Key" value on the modal. This is done for demonstration and learning only.
<strong>NOTE:</strong><br> We don't really need to show the "Key" value on the modal. This is done for demonstration and learning only.

We are also going to use input controls on the modals for all values, just to make this simple to demonstrate. There are many other controls available to experiment with, based on your use case needs.
</aside>
Expand Down Expand Up @@ -247,7 +247,7 @@ Add a `Controls` > `Number input` control and set the `Control ID` to `am_Over_R

The `OverRide` values represents whatever value the user decides is an appropriate adjustment. When we store this value, **we will not alter the source data value for revenue in any way.**

Instead, we will store it in a log table, and later we will also show it in a reporting table along with the orginal value for `Revenue` for easy comparison.
Instead, we will store it in a log table, and later we will also show it in a reporting table along with the original value for `Revenue` for easy comparison.

At this point we have all our controls and need to map actions to populate them with values. We have not worried about UI appearance; that is easy and we will do that later.

Expand Down Expand Up @@ -279,7 +279,7 @@ We can organized the controls a bit and added a `UI` > `Text` to each "block" of

<img src="assets/af-18.png" width="500"/>

We also want to place the two groups of controls into their own [Containers](https://help.sigmacomputing.com/docs/organize-workbook-layouts-with-containers). This will allow us to taget everything in a container by its name. A big time saver.
We also want to place the two groups of controls into their own [Containers](https://help.sigmacomputing.com/docs/organize-workbook-layouts-with-containers). This will allow us to target everything in a container by its name. A big time saver.

Just click-hold and drag around the controls and select the container icon as shown below:

Expand Down Expand Up @@ -469,12 +469,12 @@ The `Approval Log` was moved back to the `Approvals` page for this video only:
<!-- END OF SECTION-->

## Personas
Our use case calls for two user personas. We will use `Adjuster` to represent the person interating with a customer, making adjustments and dealing with rejections after the fact.
Our use case calls for two user personas. We will use `Adjuster` to represent the person interacting with a customer, making adjustments and dealing with rejections after the fact.

The second persona will be the person who has the final say on any adjustment request. We will call them the `Approver`.

<aside class="positive">
<strong>IMPORTANT:</strong><br> We are hard-coding two personas so that we don't have to deal with the extra steps having to logout/login as differnt users or even simply using Sigma's "User Impersonation" feature. The data app can easily be converted to use a user's team or user attribute so that personal control is automated and controlled centrally.
<strong>IMPORTANT:</strong><br> We are hard-coding two personas so that we don't have to deal with the extra steps having to logout/login as different users or even simply using Sigma's "User Impersonation" feature. The data app can easily be converted to use a user's team or user attribute so that personal control is automated and controlled centrally.
</aside>

On the `Approvals` page, add a new `List control` and configure it as shown:
Expand All @@ -491,7 +491,7 @@ Configure for these columns, matching on the `Key` column in the two elements:

<img src="assets/af-40.png" width="400"/>

While testing it can be useful to hide some columns in the `Orders to Approve` table, which should look something like this after addin the lookup:
While testing it can be useful to hide some columns in the `Orders to Approve` table, which should look something like this after adding the lookup:

<img src="assets/af-41.png" width="800"/>

Expand Down Expand Up @@ -603,7 +603,7 @@ Adjust the `Open a modal` to target the `Approver Modal` for each `Set contol va

Drag the `Open a modal` action to the last position.

A quick test with an order that has been `Adjusted` already should then be routed to the `Approver Modal` with all contols showing the correct values:
A quick test with an order that has been `Adjusted` already should then be routed to the `Approver Modal` with all controls showing the correct values:

<img src="assets/af-53.png" width="800"/>

Expand All @@ -612,7 +612,7 @@ A quick test with an order that has been `Adjusted` already should then be route
</aside>

### Reject handling
We added a way for the appover to reject records, but we also need a way for the adjuster to resubmit rejects for approval again too. This is just a repeat of what we just did.
We added a way for the approver to reject records, but we also need a way for the adjuster to resubmit rejects for approval again too. This is just a repeat of what we just did.

From the `Orders to Approve` table, `Actions`, we want to duplicate the `New Orders` sequence (since this one opens the adjuster modal).

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ Rename the page to `Adjustments` and the title from `New Modal` to `Adjustments`
For the purposes of this demonstration, this modal will allow the user to adjust the selected `Coalesced Revenue` from the pivot table, choosing from three different methods. It will also display information about selections have been made.

<aside class="positive">
<strong>IMPORTANT:</strong><br> It production, it may not be desireable to show the additional details we will configure for display. We do so now for clarity only.
<strong>IMPORTANT:</strong><br> It production, it may not be desirable to show the additional details we will configure for display. We do so now for clarity only.
</aside>

### Adding the Controls
Expand All @@ -407,7 +407,7 @@ Add `Number input` control and set the `Control ID` to `p_current`. Also set the
#### 2: Level selected (p_level):
Add `nunber input` control and set the `Control ID` to `p_level`. Also set the `Data format` to `Automatic`.

#### 3: Key correcsponding to the level selected (p_key):
#### 3: Key corresponding to the level selected (p_key):
Add `text input` control and set the `Control ID` to `p_key`. Also set the `Operator` to `Equal to`.

#### 4: Selected product type (p_type):
Expand Down Expand Up @@ -549,7 +549,7 @@ Duration: 5

Sigma users will click a button to execute a stored procedure, named `SPREAD`, that is designed to handle pivot table spreading by adjusting values in a designated Snowflake table called `SPREAD_UPDATE`, based on user input.

The procedure interacts with the `BASE_TABLE` to prepare data, applies adjustments (e.g., scaling, direct changes, or percentage changes), and ensures data integrity vy not altering the source data.
The procedure interacts with the `BASE_TABLE` to prepare data, applies adjustments (e.g., scaling, direct changes, or percentage changes), and ensures data integrity while not altering the source data.

It also logs SQL operations for troubleshooting purposes.

Expand All @@ -576,7 +576,7 @@ Apply the user-specified adjustment method to update the SPREAD_UPDATE table.
Track all SQL executions for troubleshooting and transparency.


### Spreading caclculations used:
### Spreading calculations used:
The spreading method selected by the user in Sigma (`Adjust`, `Change` or `Scale`) determines the type of adjustment.

For those interested, here are the formula applied for each method:
Expand Down Expand Up @@ -736,7 +736,7 @@ Once Sigma evaluate the selected procedure, we are prompted to choose how requir

<img src="assets/pts_29.png" width="400"/>

Add another action to refesh the `Revenue Planning` pivot with the new data.
Add another action to refresh the `Revenue Planning` pivot with the new data.

Add another action to clear the `Selected Adjustments` and `Desire Adjustment` containers, just so we are always sure that the current values are removed prior to using the modal.

Expand Down Expand Up @@ -772,7 +772,7 @@ Feel free to try more adjustments using the `Adjust` or `Scale` methods. They wi

## Logging
Duration: 5
To assist in debugging and to also have a detailed audit of the adjustmnents, we have included a log table of all the adjustments.
To assist in debugging and to also have a detailed audit of the adjustments, we have included a log table of all the adjustments.

Add a new page to the workbook and rename it to `Log`.

Expand All @@ -782,7 +782,7 @@ Add a new table and connect it to the `SQL_LOG` table:

For clarity, we cleared the `SQL_LOG` table and did one adjustment so we could show the expected results from each adjustment saved.

`SQL Text` contains the actual query that was built and exectuted by the procedure:
`SQL Text` contains the actual query that was built and executed by the procedure:

<img src="assets/pts_36.png" width="800"/>

Expand Down
24 changes: 12 additions & 12 deletions site/sigmaguides/src/dataaps_fundamentals/dataaps_fundamentals.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ id: dataaps_fundamentals
summary: dataaps_fundamentals
categories: dataapps
environments: web
status: published
status: Hidden
feedback link: https://github.com/sigmacomputing/sigmaquickstarts/issues
tags: default
tags:
lastUpdated: 2024-10-24

# Data Apps Fundamentals
Expand Down Expand Up @@ -87,7 +87,7 @@ The `Project Tracker` will support the following:
</ul>

<aside class="negative">
<strong>NOTE:</strong><br> Pay attention to naming concentions used this QuickStart, especially around control IDs. This will make your build far easier as the sections progress.
<strong>NOTE:</strong><br> Pay attention to naming conventions used this QuickStart, especially around control IDs. This will make your build far easier as the sections progress.
</aside>

### What we will build
Expand Down Expand Up @@ -395,7 +395,7 @@ Rename the title from `New Modal` to `Create a New Project`.

Deselect both `Primary` and `Secondary` button options under `Footer` in the selected element panel.

Move the various elements around and resize everthing to suit. Trim any unnecessary space:
Move the various elements around and resize everything to suit. Trim any unnecessary space:

<img src="assets/dataaps_fun_2a.png" width="300"/>

Expand All @@ -411,7 +411,7 @@ Add an action to the `Create Project` button to `Close Modal`:

<img src="assets/dataaps_fun_2c.png" width="800"/>

Actions can be added in series to create dynamic behavors. For more information see [Configure an action sequence](https://help.sigmacomputing.com/docs/configure-actions-in-sequences)
Actions can be added in series to create dynamic behaviors. For more information see [Configure an action sequence](https://help.sigmacomputing.com/docs/configure-actions-in-sequences)

### Step 5:
Return to the `Project Tracker` page and add a button titled `Create Project`.
Expand Down Expand Up @@ -763,7 +763,7 @@ We need to let Sigma know which column(s) we want to bring in and how to "match"
<img src="assets/dataaps_fun_4r.png" width="400"/>

<aside class="negative">
<strong>NOTE:</strong><br> Sigma lookups are similiar (but easier) than VLOOKUP in Excel or INDEX-MATCH in Google Sheets.
<strong>NOTE:</strong><br> Sigma lookups are similar (but easier) than VLOOKUP in Excel or INDEX-MATCH in Google Sheets.
</aside>

### Step 16:
Expand Down Expand Up @@ -860,7 +860,7 @@ Add a `button and rename it to `Update Project Status`:
### Step 5:
On the `Project Tracker` page and the `Project Tracker Input Table`, add a new column via `Calculation` after the `Add Task` field and rename it to `Update Project Status` with a formula of “Update Status”.

Lets use conditional formatting to set the new columns apperance to the same as the `Add a Task` column.
Lets use conditional formatting to set the new columns appearance to the same as the `Add a Task` column.

This is made easy by adding the `Update Project Status` column to the `Apply to` list and changing the `Formatting rule` to `Is not null` as shown in the screenshot below:

Expand Down Expand Up @@ -904,7 +904,7 @@ Saving clicks is always appreciated!
### Step 11:

<aside class="negative">
<strong>NOTE:</strong><br> When we were building this, we noticed that a few rows were accidentially (on the "Control Panel" > "Status Update Input Table") created, so before we tested, we just manually deleted them so we could have a clean test.
<strong>NOTE:</strong><br> When we were building this, we noticed that a few rows were accidentally (on the "Control Panel" > "Status Update Input Table") created, so before we tested, we just manually deleted them so we could have a clean test.
</aside>

Back on the `Project Tracker` page, select `Update Status` for any project and test out the functionality of `Modal - Update Status`.
Expand Down Expand Up @@ -1120,7 +1120,7 @@ We now have:

<img src="assets/dataaps_fun_6o.png" width="800"/>

We can apply some styling by we will touch on that in the last section. Syling in Sigma is really easy so it is best to make sure the functionality all works first, and then make it look pleasing to the eye.
We can apply some styling by we will touch on that in the last section. Styling in Sigma is really easy so it is best to make sure the functionality all works first, and then make it look pleasing to the eye.

<aside class="positive">
<strong>IMPORTANT:</strong><br> While we have not really been focused on it so far, designing forms for mobile users may be an important design consideration in many use cases.
Expand Down Expand Up @@ -1224,7 +1224,7 @@ Change `Set Status Category` to be `Reviewer` too:
</aside>

### Step 10:
Select `Click to Review` in any cell and confirm again that the `Modal - Update Status` only shows the values that cooresponding to the category `Project Reviewer View`.
Select `Click to Review` in any cell and confirm again that the `Modal - Update Status` only shows the values that corresponding to the category `Project Reviewer View`.

<img src="assets/dataaps_fun_7m.png" width="400"/>

Expand All @@ -1251,7 +1251,7 @@ Open the workbook's lineage:

<img src="assets/dataaps_fun_7p.png" width="600"/>

When workbooks become large, working with the lingeage is a great way to find what you are after, jump right to the desired element and even see the SQL use to create the data for an element too.
When workbooks become large, working with the lineage is a great way to find what you are after, jump right to the desired element and even see the SQL use to create the data for an element too.

Here is a quick demo:

Expand Down Expand Up @@ -1282,7 +1282,7 @@ We have also demonstrated the other cool benefit of using containers; they can b
### Step 3:
With Sigma, your data apps can support whatever branding may be required.

You can ustomize to match your own branding and style considerations while maintaining accessibility and visual design best practices.
You can customize to match your own branding and style considerations while maintaining accessibility and visual design best practices.

Images and icons can be added for additional personalization:

Expand Down