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
- Applies to: Azure SQL Data Warehouse
- Key features: Polybase, data loading
- Programming Language: T-SQL
- Authors: Casey Karst, Barbara Kress, Ayo Olubeko
- 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:
- Login and user that is dedicated for loading data. For more details on how to do this, see Create a user for loading data
Running the sample
- Open Visual Studio or SSMS and connect to your data warehouse using the login dedicated for loading data.
- Execute the T-SQL script
- 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.
Related Links
For more information, see these articles: