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,786 questions
{count} votes

2 answers

Sort by: Most helpful
  1. ShaktiSingh-MSFT 16,251 Reputation points
    2025-03-05T05:23:14.4133333+00:00

    Hi Čončka Jan •,

    Thanks for your patience.

    I have checked internally and is informed that:

    Materialized views can’t be disabled on an account once enabled.

    This warning was removed in error, and we will update the text in the Portal and the public docs as soon as possible. We apologize for the inconvenience caused.

    However, if you feel this functionality should be enabled, we encourage you to raise your feedback over Feedback Channel Azure Cosmos DB: Azure Cosmos DB · Community.

    Team will look into the feature request depending on the up-votes and priority to work.

    Please let us know if you have further queries.

    Thank you.

    1 person found this answer helpful.
    0 comments No comments

  2. Sina Salam 18,876 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.