Skip to content

Commit 19fa461

Browse files
committed
data generation
1 parent 8cc4830 commit 19fa461

File tree

3 files changed

+37
-1
lines changed

3 files changed

+37
-1
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,35 @@
11
# WideWorldImporters Data Generation
2+
3+
The released versions of the WideWorldImporters and WideWorldImportersDW databases contains data starting January 1st 2013, up to the day these databases were generated.
4+
5+
If the sample databases are used at a later date, for demonstration or illustration purposes, it may be beneficial to include more recent sample data in the database.
6+
7+
## Data Generation in WideWorldImporters
8+
9+
To generate sample data up to the current date, follow these steps:
10+
11+
1. If you have not yet done so, install a clean version of the WideWorldImporters database. For installation instructions, [WideWorldImporters Installation and Configuration](wwi-oltp-htap-installation.md).
12+
2. Execute the following statement in the database:
13+
14+
EXEC WideWorldImporters.DataLoadSimulation.PopulateDataToCurrentDate
15+
@AverageNumberOfCustomerOrdersPerDay = 60,
16+
@SaturdayPercentageOfNormalWorkDay = 50,
17+
@SundayPercentageOfNormalWorkDay = 0,
18+
@IsSilentMode = 1,
19+
@AreDatesPrinted = 1;
20+
21+
This statement adds sample sales and purchase data in the database, up to the current date. It outputs the progress of the data generation day-by-day. It will take rougly 10 minutes for every year that needs data. Note that there are some differences in the data generated between runs, since there is a random factor in the data generation.
22+
23+
To increase or decrease the amount of data generated, in terms of orders per day, change the value for the parameter `@AverageNumberOfCustomerOrdersPerDay`. The parameters `@SaturdayPercentageOfNormalWorkDay` and `@SundayPercentageOfNormalWorkDay` are used to determine the order volume for weekend days.
24+
25+
## Importing Data in WideWorldImportersDW
26+
27+
To import sample data up to the current date in the OLAP database WideWorldImportersDW, follow these steps:
28+
29+
1. Execute the data generation logic in the WideWorldImporters OLTP database, using the steps above.
30+
2. If you have not yet done so, install a clean version of the WideWorldImportersDW database. For installation instructions, [WideWorldImporters Installation and Configuration](wwi-olap-installation.md).
31+
3. Reseed the OLAP database by executing the following statement in the database:
32+
33+
EXECUTE [Application].Configuration_ReseedETL
34+
35+
4. Run the SSIS package **Daily ETL.ispac** to import the data into the OLAP database. For instructions on how to run the ETL job, see [WideWorldImporters ETL Workflow](wwi-etl.md).

samples/databases/wide-world-importers/documentation/wwi-olap-catalog.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
The WideWorldImportersDW database is used for data warehousing and analytical processing. The transactional data about sales and purchases is generated in the WideWorldImporters database, and loaded into the WideWorldImportersDW database using a [daily ETL process](wwi-etl.md).
44

5-
The data in WideWorldImportersDW thus mirrors the data in WideWorldImporters, but the tables are organized differently. WideWorldImportersDW uses the [star schema](https://wikipedia.org/wiki/Star_schema) approach for its table design. Besides the fact and dimension tables, the database includes a number of staging tables that are used in the ETL process.
5+
The data in WideWorldImportersDW thus mirrors the data in WideWorldImporters, but the tables are organized differently. While WideWorldImporters has a traditional normalized schema, WideWorldImportersDW uses the [star schema](https://wikipedia.org/wiki/Star_schema) approach for its table design. Besides the fact and dimension tables, the database includes a number of staging tables that are used in the ETL process.
66

77
## Schemas
88

samples/databases/wide-world-importers/documentation/wwi-oltp-htap-catalog.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ These schemas are used for external applications that are not allowed to access
2727
|Reports|All access to the database from Reporting Services reports is through this schema.|
2828
|PowerBI|All access to the database from the Power BI dashboards via the Enterprise Gateway is through this schema.|
2929

30+
Note that the Reports and PowerBI schemas are not used in the initial release of the sample database. However, all Reporting Services and Power BI samples built on top of this database are encouraged to use these schemas.
31+
3032
### Development schemas
3133

3234
Special-purpose schemas

0 commit comments

Comments
 (0)