You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: samples/databases/wide-world-importers/documentation/wwi-olap-catalog.md
+38-3Lines changed: 38 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,13 +35,48 @@ WideWorldImportersDW has the following dimension tables. The description include
35
35
36
36
### Fact tables
37
37
38
-
WideWorldImportersDW has the following dimension tables. The description includes the relationship with the source tables in the WideWorldImporters database, as well as the classes of analytics/reporting queries each fact table is typically used with.
38
+
WideWorldImportersDW has the following fact tables. The description includes the relationship with the source tables in the WideWorldImporters database, as well as the classes of analytics/reporting queries each fact table is typically used with.
|Order|`Sales.Orders` and `Sales.OrderLines`|Sales people, picker/packer productivity, and on time to pick orders. In addition, low stock situations leading to back orders.|
43
43
|Sale|`Sales.Invoices` and `Sales.InvoiceLines`|Sales dates, delivery dates, profitability over time, profitability by sales person.|
44
44
|Purchase|`Purchasing.PurchaseOrderLines`|Expected vs actual lead times|
45
45
|Transaction|`Sales.CustomerTransactions` and `Purchasing.SupplierTransactions`|Measuring issue dates vs finalization dates, and amounts.|
46
46
|Movement|`Warehouse.StockTransactions`|Movements over time.|
47
-
|Stock Holding|`Warehouse.StockItemHoldings`|On-hand stock levels and value|
47
+
|Stock Holding|`Warehouse.StockItemHoldings`|On-hand stock levels and value.|
48
+
49
+
## Stored procedures
50
+
51
+
The stored procedures are used primarily for the ETL process and for configuration purposes.
52
+
53
+
Any extensions of the sample are encouraged to use the `Reports` schema for Reporting Services reports, and the `PowerBI` schema for Power-BI access.
54
+
55
+
### Application Schema
56
+
57
+
These procedures are used to configure the sample. They are used to apply enterprise edition features to the standard edition version of the sample, add PolyBase, and reseed ETL.
|Configuration_ApplyPartitionedColumnstoreIndexing|Applies both partitioning and columnstore indexes for fact tables.|
62
+
|Configuration_ConfigureForEnterpriseEdition|Applies partitioning, columnstore indexing and in-memory.|
63
+
|Configuration_EnableInMemory|Replaces the integration staging tables with SCHEMA_ONLY memory-optimized tables to improve ETL performance.|
64
+
|Configuration_ApplyPolybase|Configures an external data source, file format, and table.|
65
+
|Configuration_PopulateLargeSaleTable|Applied enterprise edition changes, then populates a larger amount of data for the 2012 calendar year as additional history.|
66
+
|Configuration_ReseedETL|Removes existing data and restarts the ETL seeds. This allows for repopulating the OLAP database to match updated rows in the OLTP database.|
67
+
68
+
### Integration Schema
69
+
70
+
Procedures used in the ETL process fall in these categories:
71
+
- Helper procedures for the ETL package - All Get* procedures.
72
+
- Procedures used by the ETL package for migrating staged data into the DW tables - All Migrate* procedures.
73
+
-`PopulateDateDimensionForYear` - Takes a year and ensures that all dates for that year are populated in the `Dimension.Date` table.
74
+
75
+
### Sequences Schema
76
+
77
+
Procedures to configure the sequences in the database.
|ReseedAllSequences|Calls the procedure `ReseedSequenceBeyondTableValue` for all sequences.|
82
+
|ReseedSequenceBeyondTableValue|Used to reposition the next sequence value beyond the value in any table that uses the same sequence. (Like a `DBCC CHECKIDENT` for identity columns equivalent for sequences but across potentially multiple tables).|
Copy file name to clipboardExpand all lines: samples/databases/wide-world-importers/documentation/wwi-oltp-htap-catalog.md
+71Lines changed: 71 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -129,3 +129,74 @@ The database schema has been code-generated based on a series of metadata tables
129
129
For security, WideWorldImporters does not allow external applications to access data schemas directly. To isolate access, WideWorldImporters uses security-access schemas that do not hold data, but contain views and stored procedures. External applications use the security schemas to retrieve the data that they are allowed to view. This way, users can only run the views and stored procedures in the secure-access schemas
130
130
131
131
For example, this sample includes Power BI dashboards. An external application accesses these Power BI dashboards from the Power BI gateway as a user that has read-only permission on the PowerBI schema. For read-only permission, the user only needs SELECT and EXECUTE permission on the PowerBI schema. A database administrator at WWI assigns these permissions as needed.
132
+
133
+
## Stored Procedures
134
+
135
+
Stored procedures are organized in schemas. Most of the schemas are used for configuration or sample purposes.
136
+
137
+
The `Website` schema contains the stored procedures that can be used by a Web front-end.
138
+
139
+
The `Reports` and `PowerBI` schemas are meant for reporting services and PowerBI purposes. Any extensions of the sample are encouraged to use these schemas for reporting purposes.
140
+
141
+
### Website schema
142
+
143
+
These are the procedures used by a client application, such as a Web front-end.
|ActivateWebsiteLogon|Allows a person (from `Application.People`) to have access to the website.|
148
+
|ChangePassword|Changes a user’s password (for users that are not using external authentication mechanisms).|
149
+
|InsertCustomerOrders|Allows inserting one or more customer orders (including the order lines).|
150
+
|InvoiceCustomerOrders|Takes a list of orders to be invoiced and processes the invoices.|
151
+
|RecordColdRoomTemperatures|Takes a sensor data list, as a table-valued parameter (TVP), and applies the data to the `Warehouse.ColdRoomTemperatures` temporal table.|
152
+
|RecordVehicleTemperature|Takes a JSON array and uses it to update `Warehouse.VehicleTemperatures`.|
153
+
|SearchForCustomers|Searches for customers by name or part of name (either the company name or the person name).|
154
+
|SearchForPeople|Searches for people by name or part of name.|
155
+
|SearchForStockItems|Searches for stock items by name or part of name or marketing comments.|
156
+
|SearchForStockItemsByTags|Searches for stock items by tags.|
157
+
|SearchForSuppliers|Searches for suppliers by name or part of name (either the company name or the person name).|
158
+
159
+
### Integration Schema
160
+
161
+
The stored procedures in this schema are used by the ETL process. They obtain the data needed from various tables for the timeframe required by the [ETL package](wwi-etl.md).
162
+
163
+
### DataLoadSimulation Schema
164
+
165
+
Simulates a workload that inserts sales and purchases. The main stored procedure is `PopulateDataToCurrentDate`, which is used to insert sample data up to the current date.
|Configuration_ApplyDataLoadSimulationProcedures|Recreates the procedures needed for data load simulation. This is needed for bringing data up to the current date.|
170
+
|Configuration_RemoveDataLoadSimulationProcedures|This removes the procedures again after data simulation is complete.|
171
+
|DeactiveTemporalTablesBeforeDataLoad|Removes the temporal nature of all temporal tables and where applicable, applies a trigger so that changes can be made as though they were being applied at an earlier date than the sys-temporal tables allow.|
172
+
|PopulateDataToCurrentDate|Used to bring the data up to the current date. Should be run before any other configuration options after restoring the database from an initial backup.|
173
+
|ReactivateTemporalTablesAfterDataLoad|Re-establishes the temporal tables, including checking for data consistency. (Removes the associated triggers).|
174
+
175
+
176
+
### Application Schema
177
+
178
+
These procedures are used to configure the sample. They are used to apply enterprise edition features to the standard edition version of the sample, and also to add auditing and full-text indexing.
|AddRoleMemberIfNonexistant|Adds a member to a role if the member isn’t already in the role|
183
+
|Configuration_ApplyAuditing|Adds auditing. Server auditing is applied for standard edition databases; additional database auditing is added for enterprise edition.|
184
+
|Configuration_ApplyColumnstoreIndexing|Applies columnstore indexing to `Sales.OrderLines` and `Sales.InvoiceLines` and reindexes appropriately.|
185
+
|Configuration_ApplyFullTextIndexing|Applies fulltext indexes to `Application.People`, `Sales.Customers`, `Purchasing.Suppliers`, and `Warehouse.StockItems`. Replaces `Website.SearchForPeople`, `Website.SearchForSuppliers`, `Website.SearchForCustomers`, `Website.SearchForStockItems`, `Website.SearchForStockItemsByTags` with replacement procedures that use fulltext indexing.|
186
+
|Configuration_ApplyPartitioning|Applies table partitioning to `Sales.CustomerTransactions and `Purchasing.SupplierTransactions`, and rearranges the indexes to suit.|
187
+
|Configuration_ApplyRowLevelSecurity|Applies row level security to filter customers by sales territory related roles.|
188
+
|Configuration_ConfigureForEnterpriseEdition|Applies columnstore indexing, full text, in-memory, polybase, and partitioning.|
189
+
|Configuration_EnableInMemory|Adds a memory-optimized filegroup (when not working in Azure), replaces `Warehouse.ColdRoomTemperatures`, `Warehouse.VehicleTemperatures` with in-memory equivalents, and migrates the data, recreates the `Website.OrderIDList`, `Website.OrderList`, `Website.OrderLineList`, `Website.SensorDataList` table types with memory-optimized equivalents, drops and recreates the procedures `Website.InvoiceCustomerOrders`, `Website.InsertCustomerOrders`, and `Website.RecordColdRoomTemperatures` that uses these table types.|
190
+
|Configuration_RemoveAuditing|Removes the auditing configuration.|
191
+
|Configuration_RemoveRowLevelSecurity|Removes the row level security configuration (this is needed for changes to the associated tables).|
192
+
|CreateRoleIfNonExistant|Creates a database role if it doesn’t already exist.|
193
+
194
+
195
+
### Sequences Schema
196
+
197
+
Procedures to configure the sequences in the database.
|ReseedAllSequences|Calls the procedure ReseedSequenceBeyondTableValue for all sequences.|
202
+
|ReseedSequenceBeyondTableValue|Used to reposition the next sequence value beyond the value in any table that uses the same sequence. (Like a DBCC CHECKIDENT for identity columns equivalent for sequences but across potentially multiple tables).|
Copy file name to clipboardExpand all lines: samples/databases/wide-world-importers/documentation/wwi-oltp-htap-installation.md
+11-1Lines changed: 11 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -43,9 +43,19 @@ To import a bacpac into a new SQL Database, you can use Management Studio.
43
43
44
44
## Configuration
45
45
46
-
The sample database can make use of Full-Text Indexing. However, that feature is not installed by default with SQL Server - you need to select it during SQL Server setup. Therefore, a post-installation step is required.
46
+
### Full-Text Indexing
47
+
48
+
The sample database can make use of Full-Text Indexing. However, that feature is not installed by default with SQL Server - you need to select it during SQL Server setup (it is enabled by default in Azure SQL DB). Therefore, a post-installation step is required.
47
49
48
50
1. In SQL Server Management Studio, connect to the WideWorldImporters database and open a new query window.
49
51
2. Run the following T-SQL command to enable the use of Full-Text Indexing in the database:
Enabling auditing in SQL Server requires server configuration. To enable SQL Server audit for the WideWorldImporters sample, run the following statement in the database:
0 commit comments