Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content

Commit 4a3bbe8

Browse files
authored
Merge pull request #5928 from ktoliver/1260714
edit pass: Two SQL articles (VSTS 1260714)
2 parents 444284f + e48d411 commit 4a3bbe8

2 files changed

Lines changed: 60 additions & 67 deletions

File tree

docs/samples/wide-world-importers-generate-data.md

Lines changed: 31 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -13,66 +13,67 @@ author: MashaMSFT
1313
ms.author: mathoma
1414
manager: craigg
1515
---
16+
1617
# WideWorldImporters data generation
1718
[!INCLUDE[appliesto-ss-asdb-xxxx-xxx-md](../includes/appliesto-ss-asdb-xxxx-xxx-md.md)]
18-
The released versions of the WideWorldImporters and WideWorldImportersDW databases contains data starting January 1 2013, up to the day these databases were generated.
19+
The released versions of the WideWorldImporters and WideWorldImportersDW databases have data from January 1, 2013, up to the day that the databases were generated.
1920

20-
When using the sample databases, it might be beneficial to include more recent sample data.
21+
When you use these sample databases, you might want to include more recent sample data.
2122

22-
## Data Generation in WideWorldImporters
23+
## Data generation in WideWorldImporters
2324

24-
To generate sample data up to the current date, follow these steps:
25+
To generate sample data up to the current date:
2526

26-
1. If you have not yet done so, install a clean version of the WideWorldImporters database. For installation instructions, **WideWorldImporters Installation and Configuration**.
27+
1. If you haven't done so, install a clean version of the WideWorldImporters database. For installation instructions, see [Installation and configuration](wide-world-importers-oltp-install-configure.md).
2728
2. Execute the following statement in the database:
2829

29-
```
30-
EXECUTE DataLoadSimulation.PopulateDataToCurrentDate
31-
@AverageNumberOfCustomerOrdersPerDay = 60,
32-
@SaturdayPercentageOfNormalWorkDay = 50,
33-
@SundayPercentageOfNormalWorkDay = 0,
34-
@IsSilentMode = 1,
35-
@AreDatesPrinted = 1;
36-
```
30+
```
31+
EXECUTE DataLoadSimulation.PopulateDataToCurrentDate
32+
@AverageNumberOfCustomerOrdersPerDay = 60,
33+
@SaturdayPercentageOfNormalWorkDay = 50,
34+
@SundayPercentageOfNormalWorkDay = 0,
35+
@IsSilentMode = 1,
36+
@AreDatesPrinted = 1;
37+
```
3738
38-
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 can take about 10 minutes for every year that needs data. There are some differences in the data generated between runs, since there is a random factor in the data generation.
39+
This statement adds sample sales and purchase data to the database, up to the current date. It displays the progress of the data generation by day. Data generation can take about 10 minutes for every year that needs data. Because of a random factor in the data generation, there are some differences in the data that's generated between runs.
3940
40-
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.
41+
To increase or decrease the amount of data generated for orders per day, change the value for the parameter `@AverageNumberOfCustomerOrdersPerDay`. Use the parameters `@SaturdayPercentageOfNormalWorkDay` and `@SundayPercentageOfNormalWorkDay` to determine the order volume for weekend days.
4142
42-
## Importing Generated Data in WideWorldImportersDW
43+
## Import generated data in WideWorldImportersDW
4344
44-
To import sample data up to the current date in the OLAP database WideWorldImportersDW, follow these steps:
45+
To import sample data up to the current date in the WideWorldImportersDW OLAP database:
4546
46-
1. Execute the data generation logic in the WideWorldImporters OLTP database, using the steps above.
47-
2. If you have not yet done so, install a clean version of the WideWorldImportersDW database. For installation instructions, **WideWorldImporters Installation and Configuration**.
47+
1. Execute the data generation logic in the WideWorldImporters OLTP database by using the steps in the preceding section.
48+
2. If you haven't yet done so, install a clean version of the WideWorldImportersDW database. For installation instructions, see [Installation and configuration](wide-world-importers-oltp-install-configure.md).
4849
3. Reseed the OLAP database by executing the following statement in the database:
4950
5051
```sql
5152
EXECUTE [Application].Configuration_ReseedETL
5253
```
5354
54-
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**.
55+
4. Run the *Daily ETL.ispac* SQL Server Integration Services package to import the data into the OLAP database. To learn how to run the ETL job, see [WideWorldImporters ETL workflow](wide-world-importers-perform-etl.md).
5556
56-
## Generating Data in WideWorldImportersDW for Performance Testing
57+
## Generate data in WideWorldImportersDW for performance testing
5758
58-
WideWorldImportersDW has the capability to arbitrarily increase data size, for the purpose of performance testing, for example with clustered columnstore.
59+
WideWorldImportersDW can arbitrarily increase data size for performance testing. For example, it can increase data size to use with clustered columnstore indexing.
5960
60-
One of the challenges is to keep the size of the download small enough to download easily, but large enough to demonstrate SQL Server performance features. For example, significant benefits for columnstore indexes happen only when working with larger numbers of rows.
61+
One of the challenges is to keep the size of the download small enough to download easily, but large enough to demonstrate SQL Server performance features. For example, significant benefits for columnstore indexes are achieved only when you work with larger numbers of rows.
6162
62-
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 January 1 2013.
63+
You can use the `Application.Configuration_PopulateLargeSaleTable` procedure to increase the number of rows in the `Fact.Sale` table. The rows are inserted in the 2012 calendar year to avoid colliding with existing World Wide Importers data that begins January 1, 2013.
6364
64-
### Procedure Details
65+
### Procedure details
6566
66-
#### Name:
67+
#### Name
6768
6869
Application.Configuration_PopulateLargeSaleTable
6970
70-
#### Parameters:
71+
#### Parameters
7172
7273
`@EstimatedRowsFor2012` **bigint** (with a default of 12000000)
7374
74-
#### Result:
75+
#### Result
7576
76-
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 limitation could be changed, but is there to avoid accidental overinflations of the table.
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 to 50,000 per day. You can change this limitation, but the limitation helps you avoid accidental overinflations of the table.
7778
78-
In addition, the procedure applies clustered columnstore indexing, if it has not been applied already.
79+
The procedure also applies clustered columnstore indexing if it hasn't already been applied.

docs/samples/wide-world-importers-perform-etl.md

Lines changed: 29 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -15,59 +15,51 @@ manager: craigg
1515
---
1616
# WideWorldImportersDW ETL workflow
1717
[!INCLUDE[appliesto-ss-asdb-xxxx-xxx-md](../includes/appliesto-ss-asdb-xxxx-xxx-md.md)]
18-
The ETL package WWI_Integration is used to migrate data from the WideWorldImporters database to the WideWorldImportersDW database as the data changes. The package is run periodically (most commonly daily).
18+
Use the *WWI_Integration* ETL package to migrate data from the WideWorldImporters database to the WideWorldImportersDW database as data changes. The package is run periodically (usually daily).
1919

20-
## Overview
20+
The package ensures high performance by using SQL Server Integration Services to orchestrate bulk T-SQL operations (instead of separate transformations in Integration Services).
2121

22-
The design of the package uses SQL Server Integration Services (SSIS) to orchestrate bulk T-SQL operations (rather than as separate transformations within SSIS) to ensure high performance.
22+
Dimensions are loaded first, and then Fact tables are loaded. You can rerun the package any time after a failure.
2323

24-
Dimensions are loaded first, followed by Fact tables. The package can be re-run at any time after a failure.
25-
26-
The workflow is as follows:
24+
The workflow looks like this:
2725

2826
![WideWorldImporters ETL workflow](media/wide-world-importers/wideworldimporters-etl-workflow.png)
2927

30-
It starts with an expression task that works out the appropriate cutoff time. This time is the current time less a few minutes. (This is more robust than requesting data right to the current time). It then truncates any milliseconds from the time.
28+
The workflow starts with an expression task that determines the appropriate cutoff time. The cutoff time is the current time minus a few minutes. (This approach is more robust than requesting data right to the current time.) Any milliseconds are truncated from the time.
3129

32-
The main processing starts by populating the Date dimension table. It ensures that all dates for the current year have been populated in the table.
30+
The main processing starts by populating the Date dimension table. The processing ensures that all dates for the current year have been populated in the table.
3331

34-
After this, a series of data flow tasks loads each dimension, then each fact.
32+
Next, a series of data flow tasks loads each dimension. Then, they load each fact.
3533

3634
## Prerequisites
3735

38-
- SQL Server 2016 (or higher) with the databases WideWorldImporters and WideWorldImportersDW. These can be on the same or different instances of SQL Server.
39-
- SQL Server Management Studio (SSMS)
40-
- SQL Server 2016 Integration Services (SSIS).
41-
- Make sure you have created an SSIS Catalog. If not, right click **Integration Services** in SSMS Object Explorer, and choose **Add Catalog**. Follow the defaults. It will ask you to enable sqlclr and provide a password.
36+
- SQL Server 2016 (or later), with the WideWorldImporters and WideWorldImportersDW databases (in the same or in different instances of SQL Server)
37+
- SQL Server Management Studio
38+
- SQL Server 2016 Integration Services
39+
- Ensure that you create an Integration Services catalog. To create an Integration Services catalog, in SQL Server Management Studio Object Explorer, right-click **Integration Services**, and then select **Add Catalog**. Leave the default options. You are prompted to enable SQLCLR and provide a password.
4240

4341

4442
## Download
4543

46-
The latest release of the sample:
47-
48-
[wide-world-importers-release](http://go.microsoft.com/fwlink/?LinkID=800630)
49-
50-
Download the SSIS package file **Daily ETL.ispac**.
51-
52-
Source code to recreate the sample database is available from the following location.
44+
For the latest release of the sample, see [wide-world-importers-release](http://go.microsoft.com/fwlink/?LinkID=800630). Download the *Daily ETL.ispac* Integration Services package file.
5345

54-
[wide-world-importers](https://github.com/Microsoft/sql-server-samples/tree/master/samples/databases/wide-world-importers/wwi-integration-etl)
46+
For the source code to re-create the sample database, see [wide-world-importers](https://github.com/Microsoft/sql-server-samples/tree/master/samples/databases/wide-world-importers/wwi-integration-etl).
5547

5648
## Install
5749

58-
1. Deploy the SSIS package.
59-
- Open the "Daily ETL.ispac" package from Windows Explorer. This will launch the Integration Services Deployment Wizard.
60-
- Under "Select Source" follow the default Project Deployment, with the path pointing to the "Daily ETL.ispac" package.
61-
- Under "Select Destination" enter the name of the server that hosts the SSIS catalog.
62-
- Select a path under the SSIS catalog, for example under a new folder "WideWorldImporters".
63-
- Finalize the wizard by clicking Deploy.
64-
65-
2. Create a SQL Server Agent job for the ETL process.
66-
- In SSMS, right-click "SQL Server Agent" and select New->Job.
67-
- Pick a name, for example "WideWorldImporters ETL".
68-
- Add a Job Step of type "SQL Server Integration Services Package".
69-
- Select the server with the SSIS catalog, and select the "Daily ETL" package.
70-
- Under Configuration->Connection Managers ensure the connections to the source and target are configured correctly. The default is to connect to the local instance.
71-
- Click OK to create the Job.
72-
73-
3. Execute or schedule the Job.
50+
1. Deploy the Integration Services package:
51+
1. In Windows Explorer, open the *Daily ETL.ispac* package. This launches the SQL Server Integration Services Deployment Wizard.
52+
2. Under **Select Source**, follow the defaults for Project Deployment, with the path pointing to the *Daily ETL.ispac* package.
53+
3. Under **Select Destination**, enter the name of the server that hosts the Integration Services catalog.
54+
4. Select a path under the Integration Services catalog, for example, in a new folder named *WideWorldImporters*.
55+
5. Select **Deploy** to finish the wizard.
56+
57+
2. Create a SQL Server Agent job for the ETL process:
58+
1. In Management Studio, right-click **SQL Server Agent**, and then select **New** > **Job**.
59+
2. Enter a name, for example, *WideWorldImporters ETL*.
60+
3. Add a **Job Step** of the type **SQL Server Integration Services Package**.
61+
4. Select the server that has the Integration Services catalog, and then select the *Daily ETL* package.
62+
5. Under **Configuration** > **Connection Managers**, ensure that the connections to the source and target are configured correctly. The default is to connect to the local instance.
63+
6. Select **OK** to create the job.
64+
65+
3. Execute or schedule the job.

0 commit comments

Comments
 (0)