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.
While many features are automatically enabled and built-in to Cosmos DB in Microsoft Fabric, there are still a few places where you can customize the behavior of your container through configuration. In this guide, you walk through the steps to configure the most common customizable settings for a container in your Cosmos DB in Fabric database.
Prerequisites
An existing Fabric capacity
- If you don't have Fabric capacity, start a Fabric trial.
An existing Cosmos DB database in Fabric
- If you don't have one already, create a new Cosmos DB database in Fabric.
An existing container with data
- If you don't have one already, we suggest that you load the sample data container.
Note
Databases do not support offer replacement for containers, meaning you cannot change a container's throughput after it has been created.
Update settings
First, use the Settings section for a container to customize and observe the most common options including, but not limited to time-to-live (TTL), geospatial configuration, and partitioning.
Open the Fabric portal (https://app.fabric.microsoft.com).
Navigate to your existing Cosmos DB database.
Select and expand your existing container. Then, select Settings.
In the Settings section, select the redundant Settings tab.
Now, observe the value for the Partition key option.
Next, optionally configure the Time to Live and Geospatial Configuration values.
Select Save to persist your changes.
Tip
For more information on time-to-live (TTL) configuration, see time-to-live. For more information on geospatial configuration, see geospatial data.
Rework indexing policy
Now, use the Indexing Policy section to customize how indexing works for your container. Indexing customizes how Cosmos DB converts items into a tree representation internally. Customizing the indexing policy can tune the performance of your container to better align with your profile of your data workload.
Still in the Settings section, select the Indexing Policy tab.
Update the editor with a new JSON indexing policy:
{ "indexingMode": "consistent", "automatic": true, "includedPaths": [ { "path": "/*" } ], "excludedPaths": [ { "path": "/\"_etag\"/?" } ] }
Note
By default, Cosmos DB in Fabric automatically indexes every property for all items in your container. The policy illustrated in this example is the default policy for a new container.
Select Save to persist your changes.
Tip
For more information on indexing, see indexing policies.