Azure Cosmos DB SQL API - enabling Materialized View

Alpee Jain 20 Reputation points
2023-07-06T11:04:50.3733333+00:00

Hi All,

I am trying to enable the Materialized View for my Cosmos DB No SQL Api, it shows the messsage as attached, indicating materialized view has been enabled. But it does not. What am I missing? I am using free version (up to 1000 RUs)

Azure Cosmos DB
Azure Cosmos DB
An Azure NoSQL database service for app development.
1,901 questions
{count} votes

Accepted answer
  1. SSingh-MSFT 16,371 Reputation points Moderator
    2023-07-06T11:47:23.16+00:00

    Hi
    AJ
    ,

    Welcome to Microsoft Q&A forum and thanks for using Azure Services.

    As I understand, you are not able to find if Materialized Views are enabled for your Azure Cosmos Database NoSQL API.

    Please note that there are a few limitations with the Azure Cosmos DB for NoSQL API materialized view feature while it is in preview:

    • Materialized views can't be created on a container that existed before support for materialized views was enabled on the account. To use materialized views, create a new container after the feature is enabled.
    • WHERE clauses aren't supported in the materialized view definition.
    • You can project only the source container item's JSON object property list in the materialized view definition. Currently, the list can contain only one level of properties in the JSON tree.
    • In the materialized view definition, aliases aren't supported for fields of documents.
    • We recommend that you create a materialized view when the source container is still empty or has only a few items.
    • Restoring a container from a backup doesn't restore materialized views. You must re-create the materialized views after the restore process is finished.
    • You must delete all materialized views that are defined on a specific source container before you delete the source container.
    • Point-in-time restore, hierarchical partitioning, and end-to-end encryption aren't supported on source containers that have materialized views associated with them.
    • Role-based access control is currently not supported for materialized views.
    • Cross-tenant customer-managed key (CMK) encryption isn't supported on materialized views.
    • Currently, this feature can't be enabled if any of the following features are enabled: partition merge, analytical store, or continuous backup.

    Note the additional following limitations:

    • Availability zones
      • Materialized views can't be enabled on an account that has availability zone-enabled regions.
      • Adding a new region with an availability zone isn't supported after enableMaterializedViews is set to true on the account.
    • Periodic backup and restore
      • Materialized views aren't automatically restored by using the restore process. You must re-create the materialized views after the restore process is finished. Then, you should configure enableMaterializedViews on the restored account before you create the materialized views and builders again.

    Request you to please check if all above mentioned prerequisites are satisfied for your account.

    Hope this helps. If this answers your query, do click Accept Answer and Mark Helpful for the same. And, if you have any further query do let us know.

    Thank you.

    0 comments No comments

0 additional answers

Sort by: Most 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.