|
1 | | ---- |
2 | | -title: "Data generation | Microsoft Docs" |
3 | | -ms.custom: "" |
4 | | -ms.date: "01/30/2017" |
5 | | -ms.reviewer: "" |
6 | | -ms.suite: "" |
7 | | -ms.tgt_pltfrm: "" |
8 | | -ms.prod: "sql-non-specified" |
9 | | -ms.technology: |
10 | | - - " database-engine " |
11 | | -ms.topic: "article" |
12 | | -ms.assetid: f387273b-8b5f-4687-b033-09499ea2d68f |
13 | | -caps.latest.revision: 4 |
14 | | -author: "BarbKess" |
15 | | -ms.author: "barbkess" |
16 | | -robots: noindex,nofollow |
17 | | ---- |
18 | | -# WideWorldImporters data generation |
19 | | -The released versions of the WideWorldImporters and WideWorldImportersDW databases contains data starting January 1st 2013, up to the day these databases were generated. |
20 | | - |
21 | | -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. |
22 | | - |
23 | | -## Data Generation in WideWorldImporters |
24 | | - |
25 | | -To generate sample data up to the current date, follow these steps: |
26 | | - |
27 | | -1. If you have not yet done so, install a clean version of the WideWorldImporters database. For installation instructions, **WideWorldImporters Installation and Configuration**. |
28 | | -2. Execute the following statement in the database: |
29 | | - |
30 | | -``` |
31 | | - EXECUTE DataLoadSimulation.PopulateDataToCurrentDate |
32 | | - @AverageNumberOfCustomerOrdersPerDay = 60, |
33 | | - @SaturdayPercentageOfNormalWorkDay = 50, |
34 | | - @SundayPercentageOfNormalWorkDay = 0, |
35 | | - @IsSilentMode = 1, |
36 | | - @AreDatesPrinted = 1; |
37 | | -``` |
38 | | - |
39 | | -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. |
40 | | - |
41 | | -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. |
42 | | - |
43 | | -## Importing Generated Data in WideWorldImportersDW |
44 | | - |
45 | | -To import sample data up to the current date in the OLAP database WideWorldImportersDW, follow these steps: |
46 | | - |
47 | | -1. Execute the data generation logic in the WideWorldImporters OLTP database, using the steps above. |
48 | | -2. If you have not yet done so, install a clean version of the WideWorldImportersDW database. For installation instructions, **WideWorldImporters Installation and Configuration**. |
49 | | -3. Reseed the OLAP database by executing the following statement in the database: |
50 | | - |
51 | | -``` |
52 | | - EXECUTE [Application].Configuration_ReseedETL |
53 | | -``` |
54 | | - |
55 | | -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**. |
56 | | - |
57 | | -## Generating Data in WideWorldImportersDW for Performance Testing |
58 | | - |
59 | | -WideWorldImportersDW has the capability to arbitrarily increase data size, for the purpose of performance testing, for example with clustered columnstore. |
60 | | - |
61 | | -One of the challenges when shipping a sample like World Wide Importers is to keep the size of the download small enough to be distributable but large enough to be able to demonstrate SQL Server performance features. One area where this is a particular challenge is when working with columnstore indexes. Significant benefits come only when working with larger numbers of rows. |
62 | | - |
63 | | -The procedure `Application.Configuration_PopulateLargeSaleTable` can be used to greatly increase the number of rows in the `Fact.Sale` table. Note that the rows are inserted in the 2012 calendar year to avoid colliding with existing World Wide Importers data starting at 1st January 2013. |
64 | | - |
65 | | -### Procedure Details |
66 | | - |
67 | | -#### Name: |
68 | | - |
69 | | - Application.Configuration_PopulateLargeSaleTable |
70 | | - |
71 | | -#### Parameters: |
72 | | - |
73 | | - `@EstimatedRowsFor2012` **bigint** (with a default of 12000000) |
74 | | - |
75 | | -#### Result: |
76 | | - |
77 | | -Approximately the required number of rows are inserted into the `Fact.Sale` table in the 2012 year. The procedure artificially limits the number of rows per day to 50000. This could be changed but is there to avoid accidential overinflations of the table. |
78 | | - |
| 1 | +--- |
| 2 | +title: "Data generation | Microsoft Docs" |
| 3 | +ms.custom: "" |
| 4 | +ms.date: "01/30/2017" |
| 5 | +ms.reviewer: "" |
| 6 | +ms.suite: "" |
| 7 | +ms.tgt_pltfrm: "" |
| 8 | +ms.prod: "sql-non-specified" |
| 9 | +ms.technology: |
| 10 | + - " database-engine " |
| 11 | +ms.topic: "article" |
| 12 | +ms.assetid: f387273b-8b5f-4687-b033-09499ea2d68f |
| 13 | +caps.latest.revision: 4 |
| 14 | +author: "BarbKess" |
| 15 | +ms.author: "barbkess" |
| 16 | +manager: "jhubbard" |
| 17 | +robots: noindex,nofollow |
| 18 | +--- |
| 19 | +# WideWorldImporters data generation |
| 20 | +The released versions of the WideWorldImporters and WideWorldImportersDW databases contains data starting January 1st 2013, up to the day these databases were generated. |
| 21 | + |
| 22 | +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. |
| 23 | + |
| 24 | +## Data Generation in WideWorldImporters |
| 25 | + |
| 26 | +To generate sample data up to the current date, follow these steps: |
| 27 | + |
| 28 | +1. If you have not yet done so, install a clean version of the WideWorldImporters database. For installation instructions, **WideWorldImporters Installation and Configuration**. |
| 29 | +2. Execute the following statement in the database: |
| 30 | + |
| 31 | +``` |
| 32 | + EXECUTE DataLoadSimulation.PopulateDataToCurrentDate |
| 33 | + @AverageNumberOfCustomerOrdersPerDay = 60, |
| 34 | + @SaturdayPercentageOfNormalWorkDay = 50, |
| 35 | + @SundayPercentageOfNormalWorkDay = 0, |
| 36 | + @IsSilentMode = 1, |
| 37 | + @AreDatesPrinted = 1; |
| 38 | +``` |
| 39 | + |
| 40 | +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. |
| 41 | + |
| 42 | +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. |
| 43 | + |
| 44 | +## Importing Generated Data in WideWorldImportersDW |
| 45 | + |
| 46 | +To import sample data up to the current date in the OLAP database WideWorldImportersDW, follow these steps: |
| 47 | + |
| 48 | +1. Execute the data generation logic in the WideWorldImporters OLTP database, using the steps above. |
| 49 | +2. If you have not yet done so, install a clean version of the WideWorldImportersDW database. For installation instructions, **WideWorldImporters Installation and Configuration**. |
| 50 | +3. Reseed the OLAP database by executing the following statement in the database: |
| 51 | + |
| 52 | +``` |
| 53 | + EXECUTE [Application].Configuration_ReseedETL |
| 54 | +``` |
| 55 | + |
| 56 | +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**. |
| 57 | + |
| 58 | +## Generating Data in WideWorldImportersDW for Performance Testing |
| 59 | + |
| 60 | +WideWorldImportersDW has the capability to arbitrarily increase data size, for the purpose of performance testing, for example with clustered columnstore. |
| 61 | + |
| 62 | +One of the challenges when shipping a sample like World Wide Importers is to keep the size of the download small enough to be distributable but large enough to be able to demonstrate SQL Server performance features. One area where this is a particular challenge is when working with columnstore indexes. Significant benefits come only when working with larger numbers of rows. |
| 63 | + |
| 64 | +The procedure `Application.Configuration_PopulateLargeSaleTable` can be used to greatly increase the number of rows in the `Fact.Sale` table. Note that the rows are inserted in the 2012 calendar year to avoid colliding with existing World Wide Importers data starting at 1st January 2013. |
| 65 | + |
| 66 | +### Procedure Details |
| 67 | + |
| 68 | +#### Name: |
| 69 | + |
| 70 | + Application.Configuration_PopulateLargeSaleTable |
| 71 | + |
| 72 | +#### Parameters: |
| 73 | + |
| 74 | + `@EstimatedRowsFor2012` **bigint** (with a default of 12000000) |
| 75 | + |
| 76 | +#### Result: |
| 77 | + |
| 78 | +Approximately the required number of rows are inserted into the `Fact.Sale` table in the 2012 year. The procedure artificially limits the number of rows per day to 50000. This could be changed but is there to avoid accidential overinflations of the table. |
| 79 | + |
79 | 80 | In addition, the procedure applies clustered columnstore indexing, if it has not been applied already. |
0 commit comments