Tutorial: Load data with T-SQL into a Warehouse
Applies to: ✅ Warehouse in Microsoft Fabric
In this tutorial, learn how to load data from a public storage Azure Blob storage account into Warehouse tables with T-SQL.
Note
This tutorial forms part of an end-to-end scenario. In order to complete this tutorial, you must first complete these tutorials:
Load data with T-SQL
In this task, learn to load data with T-SQL.
Ensure that the workspace you created in the first tutorial is open.
On the Home ribbon, select New SQL query.
In the query editor, paste the following code. The code copies data from Parquet files sourced from an Azure Blob storage account into the
dimension_city
table andfact_sale
table.--Copy data from the public Azure storage account to the dimension_city table. COPY INTO [dbo].[dimension_city] FROM 'https://fabrictutorialdata.blob.core.windows.net/sampledata/WideWorldImportersDW/tables/dimension_city.parquet' WITH (FILE_TYPE = 'PARQUET'); --Copy data from the public Azure storage account to the fact_sale table. COPY INTO [dbo].[fact_sale] FROM 'https://fabrictutorialdata.blob.core.windows.net/sampledata/WideWorldImportersDW/tables/fact_sale.parquet' WITH (FILE_TYPE = 'PARQUET');
On the query designer ribbon, select Run to execute the query.
When the script execution completes, review the messages to determine how many rows were loaded into the
dimension_city
table andfact_sale
table.To load a preview of the loaded data, in the Explorer pane, select
fact_sale
.Rename the query as
Load Tables
.