Create a sample Warehouse in Microsoft Fabric
Applies to: Warehouse in Microsoft Fabric
This article describes how to get started with sample Warehouse using the Microsoft Fabric portal, including creation and consumption of the warehouse.
How to create a new warehouse with sample data
In this section, we walk you through creating a new Warehouse with sample data.
Create a warehouse sample using the Home hub
The first hub in the navigation pane is the Home hub. You can start creating your warehouse sample from the Home hub by selecting the Warehouse sample card under the New section.
Provide the name for your sample warehouse and select Create.
The create action creates a new Warehouse and start loading sample data into it. The data loading takes few seconds to complete.
On completion of loading sample data, the warehouse opens with data loaded into tables and views to query.
Load sample data into existing warehouse
Once you have created your warehouse, you can load sample data into warehouse from Use sample database card.
The data loading takes few seconds to complete.
On completion of loading sample data, the warehouse displays data loaded into tables and views to query.
Sample scripts
Your new warehouse is ready to accept T-SQL queries. The following sample T-SQL scripts can be used on the sample data in your new warehouse.
Note
It is important to note that much of the functionality described in this section is also available to users via a TDS end-point connection and tools such as SQL Server Management Studio (SSMS) or Azure Data Studio (for users who prefer to use T-SQL for the majority of their data processing needs). For more information, see Connectivity or Query a warehouse.
/*************************************************
Get number of trips performed by each medallion
**************************************************/
SELECT
M.MedallionID
,M.MedallionCode
,COUNT(T.TripDistanceMiles) AS TotalTripCount
FROM
dbo.Trip AS T
JOIN
dbo.Medallion AS M
ON
T.MedallionID=M.MedallionID
GROUP BY
M.MedallionID
,M.MedallionCode
/****************************************************
How many passengers are being picked up on each trip?
*****************************************************/
SELECT
PassengerCount,
COUNT(*) AS CountOfTrips
FROM
dbo.Trip
WHERE
PassengerCount > 0
GROUP BY
PassengerCount
ORDER BY
PassengerCount
/*********************************************************************************
What is the distribution of trips by hour on working days (non-holiday weekdays)?
*********************************************************************************/
SELECT
ti.HourlyBucket,
COUNT(*) AS CountOfTrips
FROM dbo.Trip AS tr
INNER JOIN dbo.Date AS d
ON tr.DateID = d.DateID
INNER JOIN dbo.Time AS ti
ON tr.PickupTimeID = ti.TimeID
WHERE
d.IsWeekday = 1
AND d.IsHolidayUSA = 0
GROUP BY
ti.HourlyBucket
ORDER BY
ti.HourlyBucket
Related content
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for