|
1 | 1 | # 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). |
0 commit comments