Tutorial: Load data using T-SQL
Applies to: ✅ Warehouse in Microsoft Fabric
Now that you know how to build a data warehouse, load a table, and generate a report, it's time to extend the solution by exploring other methods for loading data.
Load data with COPY INTO
From the ribbon, select New SQL query.
In the query editor, paste the following code.
--Copy data from the public Azure storage account to the dbo.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 dbo.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');
Select Run to execute the query. The query takes between one and four minutes to execute.
After the query is completed, review the messages to see the rows affected which indicated the number of rows that were loaded into the
dimension_city
andfact_sale
tables respectively.Load the data preview to validate the data loaded successfully by selecting on the
fact_sale
table in the Explorer.Rename the query for reference later. Right-click on SQL query 1 in the Explorer and select Rename.
Type
Load Tables
to change the name of the query.Press Enter on the keyboard or select anywhere outside the tab to save the change.