Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Important
This feature is in preview.
In this quickstart, you create a Cosmos DB database using the Microsoft Fabric portal. Once you create the database, you seed the database with a sample container and data set. Then you finish up by querying the sample data set with a sample NoSQL query.
Prerequisites
An existing Fabric capacity
- If you don't have Fabric capacity, start a Fabric trial.
Create the database
First, go to the Fabric portal and create a new Cosmos DB database within your workspace.
Open the Fabric portal (https://app.fabric.microsoft.com).
Navigate to your target workspace where you want the database to reside.
Select the Create option.
If the option to create an Cosmos DB account isn't initially available, select See all.
Within the Databases category, select Cosmos DB (preview).
Give the database a unique name and then select Create.
Wait for the database creation operation to finish before proceeding to the next step[s].
Load sample data
Next, load a sample data set into the database using the tools in the Fabric portal.
Start in the Cosmos DB database within the Fabric portal.
Select Sample data on the Build your database page.
A dialog appears informing you that the import operation could take a few minutes. Select Start to begin importing the sample data set.
Wait for the loading operation to finish.
Once the import operation concludes, select Close.
Perform a query
Finally, perform a NoSQL query to test the sample data in the SampleData container that was created.
Stay within the Cosmos DB database within the Fabric portal.
Select the newly created SampleData container. Then, select New SQL Query.
In the query editor, use this baseline query to reshape the data in the sample container into simplified JSON output.
SELECT TOP 10 VALUE { "item": CONCAT(item.name, " - ", item.category), "price": item.price } FROM items AS item ORDER BY item.price DESC
Observe the results of the query in the query editor.
[ { "item": "Basic Speaker Mini (Black) - Media", "price": 1096.74 }, { "item": "Luxe Keyboard Ultra (Red) - Perhipheral", "price": 1091.03 }, // Ommitted for brevity ]