How to disable the Materialized Views for NoSQL API (preview) in CosmosDB?

Čončka Jan 0 Reputation points
2025-02-26T06:53:03.9366667+00:00

I have a CosmosDB with NOSQL API and I would like to turn on the Continuous backup. I am receiving the error that it cannot be turned on due to the active Materialized Views for NoSQL API. In Settings/Features I can indeed see the feature active, but I don't see any way to disable it.

Please advise how to proceed.

Azure Cosmos DB
Azure Cosmos DB
An Azure NoSQL database service for app development.
1,774 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Sina Salam 18,861 Reputation points
    2025-02-26T09:02:47.6066667+00:00

    Hello Čončka Jan,

    Welcome to the Microsoft Q&A and thank you for posting your questions here.

    I understand that you would like to disable the Materialized Views for NoSQL API (preview) in CosmosDB.

    To disable the Materialized Views for NoSQL API (preview) in your Azure CosmosDB account, you can follow these steps:

    • Sign in to the Azure portal and navigate to your Azure Cosmos DB for NoSQL account.
    • Go to the Settings section in the resource menu.
    • Locate the Features section under Settings.
    • Toggle off the Materialized View for NoSQL API (preview) option.

    If you don't see an option to disable it directly, you might need to use the Azure CLI or REST API to manage this feature:

    Using Azure CLI

    1. Open your Azure CLI.
    2. Run the following command to disable the materialized views feature:
    az cosmosdb update --name <your-cosmosdb-account-name> --resource-group <your-resource-group-name> --set properties.materializedViewsEnabled=false
    
    

    Using REST API

    1. Make a PATCH request to the Cosmos DB account endpoint with the following payload:
       {
         "properties": {
           "materializedViewsEnabled": false
         }
       }
    
    

    I hope this is helpful! Do not hesitate to let me know if you have any other questions or clarifications.


    Please don't forget to close up the thread here by upvoting and accept it as an answer if it is helpful.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.