Files
sql-server-samples/samples/databases/wide-world-importers/sample-scripts/load-sample-data-using-polybase
2023-02-20 19:33:29 +00:00
..
2018-04-08 19:29:50 -07:00

Load World Wide Importers data into a data warehouse using Polybase and blob storage

This script shows how to load data from Azure Blob storage to Azure SQL Data Warehouse using Polybase. It loads the Wide World Importers dataset into an existing empty SQL Data Warehouse. To follow the script step-by-step in tutorial format, see Tutorial: Load data to Azure SQL Data Warehouse

Contents

About this sample
Before you begin
Running the sample
Sample details
Disclaimers
Related links

About this sample

  1. Applies to: Azure SQL Data Warehouse
  2. Key features: Polybase, data loading
  3. Programming Language: T-SQL
  4. Authors: Casey Karst, Barbara Kress, Ayo Olubeko
  5. Update history: 6 April 2018 - initial revision

Before you begin

To run this sample, you need the following prerequisites.

Software prerequisites:

  • SQL Server Management Studio (SSMS), or Visual Studio 2015 (or higher) with the latest SSDT installed.

Azure prerequisites:

  • An existing empty Azure SQL data warehouse

Data warehouse prerequisites:

Running the sample

  1. Open Visual Studio or SSMS and connect to your data warehouse using the login dedicated for loading data.
  2. Execute the T-SQL script
  3. Run analytics queries on your data warehouse

Sample details

The script does the following tasks to load the World Wide Importers sample dataset into your data warehouse:

  • Creates external tables that use Azure blob as the data source
  • Uses the CTAS T-SQL statement to load data into the data warehouse
  • Creates a stored procedure to generate a year of data in the date dimension and sales fact tables
  • Creates statistics on the newly loaded data

Disclaimers

The code included in this sample is not intended to be used for production purposes.

For more information, see these articles: