Skip to content

Commit d4e6fe3

Browse files
authored
Merge pull request #384 from sigmacomputing/Datamodel-edit-JP-24-April
Datamodel-edit-JP-24-April
2 parents 14182c4 + 2feceab commit d4e6fe3

14 files changed

Lines changed: 34 additions & 51 deletions

File tree

281 KB
Loading
Binary file not shown.
Binary file not shown.

site/sigmaguides/src/Fundamentals 10: Data Modeling/fundamentals_10_data_modeling.md

Lines changed: 17 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -2,42 +2,36 @@ author: pballai
22
id: fundamentals_10_data_modeling
33
summary: fundamentals_10_data_modeling
44
categories: Fundamentals
5-
status: Hidden
5+
status: Published
66
feedback link: https://github.com/sigmacomputing/sigmaquickstarts/issues
7-
tags:
8-
lastUpdated: 2024-10-23
7+
tags: default
8+
lastUpdated: 2024-10-24
99

1010
# Fundamentals 10: Data Modeling
1111

1212
## Overview
1313
Duration: 5
1414

15-
Many Sigma users are used to creating a new workbook and then adding raw warehouse tables as the foundation for their content. This often requires the user to do extra work joining tables together and adding calculated columns.
15+
Many Sigma users are used to creating a new workbook and then using warehouse tables as the data source for their content. This often requires the user to do extra data preparation work, like joining tables together, renaming fields or creating aggregations. This modeling logic is bound to a single workbook and is not reusable across your Sigma deployment. This can lead to duplicated effort and inconsistent reporting.
1616

17-
Data models avoid that work and provide business users a curated set of data with all the relevant tables, columns, and calculations pre-configured for them. This accelerates their work and also ensures that the data conforms to corporate standards.
17+
With Data Models, you can define your data transformation and semantics in one place, and use them anywhere in Sigma. This avoids duplicating effort, and provides a single source of truth for your Analytics Engineering team to collaborate on key business logic and metric definitions.
1818

19-
Data modeling in Sigma allows you to structure, join, and prepare data for exploration and analysis—without writing SQL.
19+
In this QuickStart, you'll learn how to:
2020

21-
By creating and defining relationships across your data sources, you empower teams to analyze clean, consistent data and leave data governance concerns to the modelers.
22-
23-
In this QuickStart, you’ll learn how to:
24-
25-
- Understand Sigma's data modeling philosophy
21+
- Understand Sigma's data modeling philosophy and features
2622
- Create a data model using sample data
2723
- Define relationships across tables
2824
- Add custom columns and formulas
2925
- Create metrics
3026
- Use column-level security
3127
- Use column folders
3228
- Materialize a data model
33-
- Publish reusable models for analysis
29+
- Deploy reusable models for analysis
3430

3531
### Our Modeling Approach
36-
A primary design goal for Sigma data modeling is to make it as easy as possible to create a model so your business users spend more time focused on which data to expose, to whom, and what the standard calculations need to be.
32+
A primary design goal for Sigma data modeling is to make model creation seamless so your data team can move fast, without managing additional complex code, and deliver governed analytics to stakeholders.
3733

38-
Sigma works directly on your cloud data warehouse and models data on top of the source tables, without copying or extracting it. Your data stays in your warehouse.
39-
40-
Sigma models are collaborative and versioned—ideal for both data teams and business users.
34+
Business users can focus on gaining insights from data without needing to worry about its physical structure, and can also contribute directly to the data model through Sigma’s UI. Sigma models are collaborative and versioned—ideal for both data teams and business users.
4135

4236
<aside class="positive">
4337
<strong>IMPORTANT:</strong><br> Some screens in Sigma may appear slightly different from those shown in QuickStarts. This is because Sigma is continuously adding and enhancing functionality. Rest assured, Sigma’s intuitive interface ensures that any differences will not prevent you from successfully completing any QuickStart.
@@ -168,7 +162,7 @@ Duration: 5
168162

169163
Since we know that marketing will always need columns from the `D_CUSTOMER` and `F_POINT_OF_SALE` tables, we can join them directly.
170164

171-
Using the standard method, we will join these two tables. The combination of these three tables will satisfy marketing's initial request.
165+
Using joins, we’ll connect these two tables. Combined with the base table, this satisfies marketings initial request.
172166

173167
From `Plugs Sales`, select `Element source` > `Join` from the table menu:
174168

@@ -219,15 +213,6 @@ The results look like this:
219213

220214
<img src="assets/dm_32a.png" width="800"/>
221215

222-
### Column details
223-
Sometimes it may not be clear if a column has data of interest. For example, for `Transaction type`, we can check the `Column details` and see the distribution of values:
224-
225-
<img src="assets/dm_37.png" width="350"/>
226-
227-
In this manner, we can see that it does have data that may be of interest:
228-
229-
<img src="assets/dm_38.png" width="500"/>
230-
231216
Click `Publish`.
232217

233218
![Footer](assets/sigma_footer.png)
@@ -236,26 +221,14 @@ Click `Publish`.
236221
## Relationships
237222
Duration: 5
238223

239-
Data models can be used as a starting point for builders in Sigma to create new workbooks. Relationships power this starting point and include features to allow the builder to quickly get what they need, instead of accessing raw warehouse content (e.g., tables, views).
224+
Data models serve as a starting point for builders in Sigma to explore data. Relationships power this experience and make it easy for the builder to quickly get what they need through predefined modeling logic, rather than working directly with raw warehouse content such as tables or views.
240225

241226
Once built, the data model might look like this, allowing the builder to get moving much more quickly than starting a workbook from scratch.
242227

243228
<img src="assets/dm_55.png" width="800"/>
244229

245-
### Key Concepts in Sigma Data Modeling
246-
247-
- Relationships allow you to specify the join logic between two different tables in a data model. After doing so, all of the fields from the “target” table become available for analysis when viewing the “source” table. **The result is an intelligent query engine that only executes joins when they are needed for analysis.**
248-
249-
- All visible levels in a dataset are flattened when used in worksheets or dashboards. This can lead to duplication if joins are not carefully managed.
250-
251-
- Hidden levels do not appear in downstream worksheets, making them ideal for handling one-to-many joins without overwhelming end users.
252-
253-
- Model grain matters: Joining too many tables—especially those with one-to-many relationships—can inflate row counts and distort metrics.
254-
255-
- You don’t always need to create child datasets. With careful use of hidden joins, a single well-structured model can support both detailed and summary-level use cases.
256-
257230
### Creating the relationships
258-
We could just join the other tables to `Plugs Sales` using the typical workbook join workflow.
231+
We could just join the other tables to `Plugs Sales` using the join workflow.
259232

260233
While this will still work, we’d miss out on one of the key benefits of using relationships—join pruning.
261234

@@ -280,7 +253,7 @@ Before we can create a relationship, we need to add the two tables we want to ex
280253

281254
Add the `D_PRODUCT` and `D_STORE` tables from the `RETAIL` schema directly to the workbook.
282255

283-
Click the <img src="assets/eyeicon.png" width="40"/> icon to prevent the tables from appearing in downstream workbooks:
256+
Click the <img src="assets/eyeicon.png" width="40"/> icon to prevent the tables from appearing in the published data model:
284257

285258
<img src="assets/dm_10a.png" width="800"/>
286259

@@ -383,7 +356,9 @@ Reopen query history and click into the new entry:
383356

384357
<img src="assets/dm_19f.png" width="800"/>
385358

386-
Now we see the `D_PRODUCT` table is being joined but the `D_STORE` table is still not present.
359+
Now we see the `D_PRODUCT` table is being joined but the `D_STORE` table is still not present:
360+
361+
<img src="assets/dm_19h.png" width="800"/>
387362

388363
<aside class="positive">
389364
<strong>IMPORTANT:</strong><br> Be thoughtful when deciding which tables to include as relationships instead of using a standard join to the base table. Consider four key factors: need, performance, security, and cost.

site/sigmaguides/src/Fundamentals 1: Getting Around - v3/Fundamentals 1: Getting Around v3.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ tags: default
88
authors: phil@sigmacomputing.com
99
lastUpdated: 2025-04-01
1010

11-
# Fundamentals 1: Getting Around
11+
# Fundamentals 01: Getting Around
1212
<!-- -->
1313

1414
## Overview
@@ -26,6 +26,8 @@ If you fall into that category, please review these summaries:
2626

2727
[I am a Dashboard Builder New to Sigma. How Can I Quickly Get Up To Speed?](https://community.sigmacomputing.com/docs?topic=3650)
2828

29+
[I am interesting in data modeling in Sigma, see Fundamentals 10: Data Modeling](https://quickstarts.sigmacomputing.com/guide/fundamentals_10_data_modeling/index.html?index=..%2F..index#0)
30+
2931
Each QuickStart in the series will use sample data Sigma provides to all customers. We will be using sales data from our fictitious company **Plugs Electronics.**
3032

3133
<aside class="positive">

site/sigmaguides/src/Fundamentals 2: Data - v3/Fundamentals 2: Data.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ tags: default
88
authors: phil@sigmacomputing.com
99
lastUpdated: 2025-03-13
1010

11-
# Fundamentals 2: Data
11+
# Fundamentals 02: Data
1212
<!-- ------------------------ -->
1313

1414
## Overview
@@ -543,6 +543,8 @@ Up until now, we have been using one table, but in practice, it is often necessa
543543

544544
Data modeling is a broad topic, and in order to make this section 'fundamental,' we will join a sample table from our `Sigma Sample Database` connection as before.
545545

546+
For those looking for a more comprehensive data modeling solution, see [Fundamentals 10: Data Modeling](https://quickstarts.sigmacomputing.com/guide/fundamentals_10_data_modeling/index.html?index=..%2F..index#0)
547+
546548
**We will also move a little faster now that we have been oriented in Sigma.**
547549

548550
We want to add a column to show inventory on-hand, from the `F_INVENTORY_ADJUSTED` table by joining it to the existing `Plugs_Store_Sales` table, **on the Data page.**

site/sigmaguides/src/Fundamentals 2: Working with Tables-v2/Fundamentals 2: Working with Tables.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -495,6 +495,8 @@ Up until now, we have been using one table, but in practice, it is often necessa
495495

496496
Data modelling is a broad topic, and in order make this section "fundamental", we will join a sample table from our `Sigma Sample Database` connection as before.
497497

498+
For those looking for a more comprehensive data modeling solution, see [Fundamentals 10: Data Modeling](https://quickstarts.sigmacomputing.com/guide/fundamentals_10_data_modeling/index.html?index=..%2F..index#0)
499+
498500
**We will also move a little faster now that we have been oriented in Sigma.**
499501

500502
We want to add a column to show inventory on-hand, from the `F_INVENTORY_ADJUSTED` table by joining it to the existing `PLUGS_DATA` table, on the `Data` page.

site/sigmaguides/src/Fundamentals 3: Data_Pivot_Tables - v3/Fundamentals 3: Data_Pivot_Tables.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ tags: default
88
authors: PhilB
99
lastUpdated: 2025-03-13
1010

11-
# Fundamentals 3: Data - Pivot Tables
11+
# Fundamentals 03: Pivot Tables
1212
<!-- ------------------------ -->
1313

1414
## Overview

site/sigmaguides/src/Fundamentals 4: Input - v3/Fundamentals 4: Input.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ tags: default
88
authors: PhilB
99
lastUpdated: 2025-03-13
1010

11-
# Fundamentals 4: Input
11+
# Fundamentals 04: Input
1212
<!-- ------------------------ -->
1313

1414
## Overview

site/sigmaguides/src/Fundamentals 5: Charts - v3/Fundamentals 5: Charts.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ tags: default
88
authors: pballai
99
lastUpdated: 2025-03-13
1010

11-
# Fundamentals 5: Charts
11+
# Fundamentals 05: Charts
1212

1313
## Overview
1414
Duration: 5

0 commit comments

Comments
 (0)