<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://ilianko.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Anko</id>
	<title>Ilianko - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://ilianko.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Anko"/>
	<link rel="alternate" type="text/html" href="https://ilianko.com/index.php?title=Special:Contributions/Anko"/>
	<updated>2026-10-26T18:16:21Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.11</generator>
	<entry>
		<id>https://ilianko.com/index.php?title=Category:DP-420_Terminology&amp;diff=6253</id>
		<title>Category:DP-420 Terminology</title>
		<link rel="alternate" type="text/html" href="https://ilianko.com/index.php?title=Category:DP-420_Terminology&amp;diff=6253"/>
		<updated>2026-10-26T15:18:01Z</updated>

		<summary type="html">&lt;p&gt;Anko: Add 100-word category description for DP-420 Terminology&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This category contains key terminology, concepts, and reference articles for the &#039;&#039;&#039;[[DP-420: Azure Cosmos DB Developer Specialty]]&#039;&#039;&#039; certification exam (&#039;&#039;Designing and Implementing Cloud-Native Applications Using Microsoft Azure Cosmos DB&#039;&#039;). It covers core NoSQL concepts, Request Units (RUs), logical and physical partitioning, data modeling strategies, provisioned and serverless throughput, global distribution, tunable consistency levels, client SDK connectivity, server-side JavaScript programming, indexing policies, Change Feed, Azure Synapse Link, Microsoft Fabric mirroring, monitoring diagnostics, backup and restore models, and data-plane security. Each article includes a concise technical overview, links to official Microsoft Learn documentation, and DP-420 style practice questions with detailed answer keys.&lt;/div&gt;</summary>
		<author><name>Anko</name></author>
	</entry>
	<entry>
		<id>https://ilianko.com/index.php?title=Azure_Cosmos_DB&amp;diff=6252</id>
		<title>Azure Cosmos DB</title>
		<link rel="alternate" type="text/html" href="https://ilianko.com/index.php?title=Azure_Cosmos_DB&amp;diff=6252"/>
		<updated>2026-10-26T15:15:50Z</updated>

		<summary type="html">&lt;p&gt;Anko: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;amp;larr; Back to [[DP-420: Azure Cosmos DB Developer Specialty|DP-420 Terminology Reference]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Category:&#039;&#039;&#039; Core Concepts&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Summary:&#039;&#039;&#039; Microsoft&#039;s globally distributed, multi-model NoSQL database service for cloud-native apps.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
Azure Cosmos DB is Microsoft&#039;s globally distributed, multi-model NoSQL database service designed for cloud-native applications requiring low latency, high availability, and elastic scalability. It supports multiple APIs (including the API for NoSQL, MongoDB, Cassandra, Gremlin, and Table), automatic and transparent horizontal partitioning, tunable consistency levels, and turnkey global distribution across any number of Azure regions.&lt;br /&gt;
&lt;br /&gt;
== More Info &amp;amp; Links ==&lt;br /&gt;
* [https://learn.microsoft.com/en-us/azure/cosmos-db/introduction Microsoft Learn: Welcome to Azure Cosmos DB]&lt;br /&gt;
* [https://learn.microsoft.com/en-us/credentials/certifications/resources/study-guides/dp-420 Microsoft Learn: DP-420 study guide]&lt;br /&gt;
&lt;br /&gt;
== DP-420 Style Practice Questions ==&lt;br /&gt;
&#039;&#039;&#039;Q1.&#039;&#039;&#039; What is a defining characteristic of Azure Cosmos DB compared to a traditional single-region relational database?&lt;br /&gt;
* A. Turnkey global distribution across multiple Azure regions with tunable consistency&lt;br /&gt;
* B. It only supports a single fixed consistency level&lt;br /&gt;
* C. It requires manual sharding scripts written by the developer&lt;br /&gt;
* D. It cannot scale horizontally&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q2.&#039;&#039;&#039; Which of the following APIs is NOT supported by Azure Cosmos DB?&lt;br /&gt;
* A. API for MySQL&lt;br /&gt;
* B. API for NoSQL&lt;br /&gt;
* C. API for MongoDB&lt;br /&gt;
* D. API for Cassandra&lt;br /&gt;
&lt;br /&gt;
== Answer Key ==&lt;br /&gt;
&#039;&#039;Answers are listed at the very end so you can attempt the questions first.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Q1 (Azure Cosmos DB):&#039;&#039;&#039; A. Turnkey global distribution across multiple Azure regions with tunable consistency — Azure Cosmos DB provides built-in global distribution and multiple tunable consistency levels, unlike traditional single-region databases.&lt;br /&gt;
* &#039;&#039;&#039;Q2 (Azure Cosmos DB):&#039;&#039;&#039; A. API for MySQL — Azure Cosmos DB supports NoSQL, MongoDB, Cassandra, Gremlin, and Table APIs, but not a dedicated &#039;API for MySQL&#039;.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;DP-420: Designing and Implementing Cloud-Native Applications Using Microsoft Azure Cosmos DB — term detail page&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[:Category:DP-420 Terminology]]&lt;br /&gt;
[[Category:Core Concepts]]&lt;/div&gt;</summary>
		<author><name>Anko</name></author>
	</entry>
	<entry>
		<id>https://ilianko.com/index.php?title=DP-420:_Azure_Cosmos_DB_Developer_Specialty&amp;diff=6251</id>
		<title>DP-420: Azure Cosmos DB Developer Specialty</title>
		<link rel="alternate" type="text/html" href="https://ilianko.com/index.php?title=DP-420:_Azure_Cosmos_DB_Developer_Specialty&amp;diff=6251"/>
		<updated>2026-10-26T15:12:09Z</updated>

		<summary type="html">&lt;p&gt;Anko: /* Uncategorized */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;DP-420: Designing and Implementing Cloud-Native Applications Using Microsoft Azure Cosmos DB&#039;&#039;&#039; — Key terminology reference for exam preparation.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Core Concepts ==&lt;br /&gt;
; [[Azure Cosmos DB]]&lt;br /&gt;
: Microsoft&#039;s globally distributed, multi-model NoSQL database service for cloud-native apps.&lt;br /&gt;
; [[Request Unit (RU)]]&lt;br /&gt;
: Normalized currency measuring the cost of database operations, independent of hardware.&lt;br /&gt;
; [[Container]]&lt;br /&gt;
: Fundamental unit of scalability/storage in Cosmos DB for NoSQL, analogous to a table.&lt;br /&gt;
; [[Item (Document)]]&lt;br /&gt;
: Fundamental unit of data, stored as a self-describing JSON document within a container.&lt;br /&gt;
; [[API for NoSQL]]&lt;br /&gt;
: Cosmos DB&#039;s native API (formerly SQL API), queried with a SQL-like language; DP-420&#039;s focus.&lt;br /&gt;
; [[OLTP]]&lt;br /&gt;
: Online Transactional Processing; small, fast operations — Cosmos DB&#039;s core transactional workload type.&lt;br /&gt;
; [[OLAP]]&lt;br /&gt;
: Online Analytical Processing; large aggregations and analytical queries over historical data&lt;br /&gt;
&lt;br /&gt;
== Data Modeling &amp;amp; Partitioning ==&lt;br /&gt;
; [[Partition Key]]&lt;br /&gt;
: Property used to distribute items across physical partitions for scalability.&lt;br /&gt;
; [[Logical Partition]]&lt;br /&gt;
: Group of items sharing the same partition key value; max 20 GB storage.&lt;br /&gt;
; [[Physical Partition]]&lt;br /&gt;
: Underlying infrastructure unit hosting one or more logical partitions.&lt;br /&gt;
; [[Synthetic Partition Key]]&lt;br /&gt;
: Concatenated/computed key combining multiple properties for better distribution.&lt;br /&gt;
; [[Hierarchical Partition Key]]&lt;br /&gt;
: Up to 3 levels of partition keys for granular, multi-tenant partitioning.&lt;br /&gt;
; [[Embedding (Denormalization)]]&lt;br /&gt;
: Nesting related data within a single document for fewer round trips.&lt;br /&gt;
; [[Referencing (Normalization)]]&lt;br /&gt;
: Storing related entities as separate documents linked by an id reference.&lt;br /&gt;
; [[Time to Live (TTL)]]&lt;br /&gt;
: Container/item setting that automatically deletes items after a set time.&lt;br /&gt;
; [[Unique Keys]]&lt;br /&gt;
: Container-level constraint enforcing uniqueness of property paths per logical partition.&lt;br /&gt;
&lt;br /&gt;
== Throughput &amp;amp; Scaling ==&lt;br /&gt;
; [[Provisioned Throughput]]&lt;br /&gt;
: Reserved, guaranteed RU/s billed regardless of consumption; suits steady workloads.&lt;br /&gt;
; [[Serverless]]&lt;br /&gt;
: Consumption-based billing for actual RUs used; suits intermittent/unpredictable traffic.&lt;br /&gt;
; [[Autoscale Throughput]]&lt;br /&gt;
: Automatically scales RU/s between 10%-100% of a configured maximum based on demand.&lt;br /&gt;
; [[Database-Level Throughput]]&lt;br /&gt;
: Provisioned throughput shared across all containers in a database.&lt;br /&gt;
; [[az cosmosdb sql container update]]&lt;br /&gt;
: CLI: updates container config (indexing, TTL, unique keys), not throughput.&lt;br /&gt;
; [[az cosmosdb sql container throughput update]]&lt;br /&gt;
: CLI: changes a container&#039;s manual RU/s or autoscale max RU/s.&lt;br /&gt;
; [[az cosmosdb sql container throughput migrate]]&lt;br /&gt;
: CLI: switches a container between manual and autoscale throughput.&lt;br /&gt;
; [[az cosmosdb sql container redistribute-partition-throughput]]&lt;br /&gt;
: CLI: reallocates RU/s unevenly across physical partitions to relieve a hot partition.&lt;br /&gt;
&lt;br /&gt;
== Data Distribution &amp;amp; Consistency ==&lt;br /&gt;
; [[Global Distribution]]&lt;br /&gt;
: Turnkey replication of data across any number of Azure regions, no code changes.&lt;br /&gt;
; [[Consistency Levels]]&lt;br /&gt;
: Five tunable levels (Strong, Bounded Staleness, Session, Consistent Prefix, Eventual).&lt;br /&gt;
; [[Automatic Failover]]&lt;br /&gt;
: Policy that automatically promotes a new write region during a regional outage.&lt;br /&gt;
; [[Multi-Region Writes]]&lt;br /&gt;
: Every region accepts reads and writes simultaneously (multi-master).&lt;br /&gt;
; [[Conflict Resolution Policy]]&lt;br /&gt;
: Defines how concurrent multi-region write conflicts are resolved (e.g., LWW).&lt;br /&gt;
; [[Session Token]]&lt;br /&gt;
: Value guaranteeing a client reads its own writes under session consistency.&lt;br /&gt;
&lt;br /&gt;
== Client Connectivity &amp;amp; SDK ==&lt;br /&gt;
; [[Gateway Mode]]&lt;br /&gt;
: SDK connectivity via a single HTTPS endpoint; more firewall-friendly, higher latency.&lt;br /&gt;
; [[Direct Mode]]&lt;br /&gt;
: SDK connectivity direct to backend replicas over TCP; lower latency, more ports needed.&lt;br /&gt;
; [[Cosmos DB Emulator]]&lt;br /&gt;
: Local, offline tool emulating Cosmos DB for development/testing without Azure cost.&lt;br /&gt;
; [[Point Operation]]&lt;br /&gt;
: Single-item operation using id + partition key, more RU-efficient than a query.&lt;br /&gt;
; [[Patch Operation]]&lt;br /&gt;
: Partial update of specific item properties without replacing the whole document.&lt;br /&gt;
; [[Transactional Batch]]&lt;br /&gt;
: Groups multiple point operations on the same logical partition into one atomic transaction.&lt;br /&gt;
; [[Bulk Support]]&lt;br /&gt;
: SDK feature optimized for loading/updating large volumes of items across many partitions.&lt;br /&gt;
; [[Optimistic Concurrency (ETag)]]&lt;br /&gt;
: Uses the ETag property with if-match preconditions to detect write conflicts.&lt;br /&gt;
; [[Continuation Token]]&lt;br /&gt;
: Opaque value used to resume a paginated query/feed from where the last page left off.&lt;br /&gt;
; [[Cross-Partition Query]]&lt;br /&gt;
: Query spanning multiple physical partitions; tuned via MaxConcurrency and MaxBufferedItemCount.&lt;br /&gt;
; [[429 Throttling Error]]&lt;br /&gt;
: Error indicating a request was rate-limited due to exceeding provisioned RU/s.&lt;br /&gt;
; [[isTombstone]]&lt;br /&gt;
&lt;br /&gt;
== Server-Side Programming ==&lt;br /&gt;
; [[x-ms-retry-after-ms]]&lt;br /&gt;
: http header value that represents in milliseconds the minimal waiting time between requests.&lt;br /&gt;
; [[Item response, Feed response]]&lt;br /&gt;
: Contains both returned data plus request charge, session token, and ETag&lt;br /&gt;
; [[Queries]]&lt;br /&gt;
: Queries&lt;br /&gt;
; [[Stored Procedure]]&lt;br /&gt;
: JavaScript logic executed server-side within a single logical partition transaction.&lt;br /&gt;
; [[BulkImportResponse]]&lt;br /&gt;
: Return object of the classic bulkImport stored procedure pattern; reports numDocsImported/continuation.&lt;br /&gt;
; [[Trigger]]&lt;br /&gt;
: Pre- or post-operation JavaScript logic, explicitly invoked by the client per request.&lt;br /&gt;
; [[User-Defined Function (UDF)]]&lt;br /&gt;
: Read-only JavaScript function extending SQL queries with custom computations.&lt;br /&gt;
; [[Aggregate Functions (COUNT, SUM, AVG, MIN, MAX)]]&lt;br /&gt;
: Built-in SQL aggregate operators (COUNT, SUM, AVG, MIN, MAX) used with GROUP BY.&lt;br /&gt;
; [[EXISTS &amp;amp; Array Functions (IS_ARRAY, ARRAY_CONTAINS)]]&lt;br /&gt;
: SQL subquery and array functions (EXISTS, IS_ARRAY, ARRAY_CONTAINS, ARRAY_LENGTH) for nested data.&lt;br /&gt;
&lt;br /&gt;
== Integration &amp;amp; Analytics ==&lt;br /&gt;
; [[Change Feed]]&lt;br /&gt;
: Persistent, ordered log of item inserts/updates, consumable by apps and Azure Functions.&lt;br /&gt;
; [[Full-Text Query]]&lt;br /&gt;
: Native keyword search via FULLTEXTCONTAINS/FULLTEXTSCORE, backed by a full-text index.&lt;br /&gt;
; [[HTAP (Hybrid Transactional and Analytical Processing)]]&lt;br /&gt;
: Architecture running analytics over operational data without impacting transactional OLTP RUs, enabled via Synapse Link/analytical store.&lt;br /&gt;
; [[Azure Synapse Link / Analytical Store]]&lt;br /&gt;
: Near real-time analytics via a separate column-store, no RU impact on transactional data.&lt;br /&gt;
; [[Azure Cosmos DB Mirroring for Fabric]]&lt;br /&gt;
: Near real-time replication of Cosmos DB data into Microsoft Fabric&#039;s OneLake.&lt;br /&gt;
; [[OneLake]]&lt;br /&gt;
: Fabric&#039;s single, unified, tenant-wide data lake storing all workloads&#039; data in Delta format.&lt;br /&gt;
; [[Delta Format]]&lt;br /&gt;
: Open-source ACID table format (Delta Lake) used for all data stored in OneLake.&lt;br /&gt;
; [[Apache Spark]]&lt;br /&gt;
: Distributed processing engine used in Synapse/Fabric notebooks to analyze Cosmos DB data.&lt;br /&gt;
; [[Serverless SQL Pool]]&lt;br /&gt;
: On-demand T-SQL query service in Azure Synapse to query Cosmos DB analytical store via OPENROWSET.&lt;br /&gt;
; [[Direct Lake]]&lt;br /&gt;
: Power BI mode reading Delta tables directly from OneLake — near-Import speed, always fresh.&lt;br /&gt;
; [[Azure Functions Integration]]&lt;br /&gt;
: Serverless compute triggered by Cosmos DB change feed for event-driven processing, denormalization, and data movement.&lt;br /&gt;
; [[Azure Logic Apps]]&lt;br /&gt;
: Low-code cloud workflow automation service integrating with Cosmos DB via connectors, triggers, and actions.&lt;br /&gt;
; [[Azure AI Search Integration]]&lt;br /&gt;
: Indexer pulls Cosmos DB data (via change feed) to enable full-text/semantic search.&lt;br /&gt;
&lt;br /&gt;
== Optimization ==&lt;br /&gt;
; [[Indexing Policy]]&lt;br /&gt;
: Defines which properties are indexed, trading off query performance vs. write RU cost.&lt;br /&gt;
; [[Range Index]]&lt;br /&gt;
: Default index type for string/numeric properties; supports equality, range, and ORDER BY.&lt;br /&gt;
; [[Spatial Index]]&lt;br /&gt;
: Accelerates geospatial queries (ST_DISTANCE, ST_WITHIN) over GeoJSON properties.&lt;br /&gt;
; [[Composite Index]]&lt;br /&gt;
: Index across multiple properties to support efficient multi-property filter/sort queries.&lt;br /&gt;
; [[Vector Index]]&lt;br /&gt;
: Enables approximate nearest-neighbor similarity search over embeddings for AI/RAG scenarios.&lt;br /&gt;
; [[Wildcard / Included &amp;amp; Excluded Paths]]&lt;br /&gt;
: Path expressions (with optional /* wildcard) controlling exactly which properties are indexed.&lt;br /&gt;
; [[Integrated Cache]]&lt;br /&gt;
: In-memory caching layer (via dedicated gateway) reducing RU cost/latency for repeated reads.&lt;br /&gt;
; [[Change Feed Estimator]]&lt;br /&gt;
: Reports pending change feed lag to help decide when to scale out consumer instances.&lt;br /&gt;
&lt;br /&gt;
== Maintenance &amp;amp; Security ==&lt;br /&gt;
; [[Alerts]]&lt;br /&gt;
: Cosmo DB alerts&lt;br /&gt;
; [[Normalized RU Consumption]]&lt;br /&gt;
: Azure Monitor metric showing % of provisioned throughput used; flags hot partitions.&lt;br /&gt;
; [[PartitionKeyRUConsumption (Diagnostic Log)]]&lt;br /&gt;
: Per-second RU/s consumption per partition key; pinpoints hot partitions.&lt;br /&gt;
; [[PartitionKeyStatistics (Diagnostic Log)]]&lt;br /&gt;
: Estimated storage size (KB) per logical partition key; flags storage skew.&lt;br /&gt;
; [[QueryRuntimeStatistics (Diagnostic Log)]]&lt;br /&gt;
: Logs query operations against the account for query performance analysis.&lt;br /&gt;
; [[ControlPlaneRequests (Diagnostic Log)]]&lt;br /&gt;
: Logs account control-plane operations, e.g. adding/removing replication regions.&lt;br /&gt;
; [[DataPlaneRequests (Diagnostic Log)]]&lt;br /&gt;
: Logs item-level create/read/replace/delete/query operations with RU charge and duration.&lt;br /&gt;
; [[KQL (Kusto Query Language)]]&lt;br /&gt;
: Query language used in Azure Monitor Log Analytics to analyze Cosmos DB diagnostic logs and metrics.&lt;br /&gt;
; [[Periodic Backup]]&lt;br /&gt;
: Original backup mode; scheduled snapshots, typically restored via a support request.&lt;br /&gt;
; [[Continuous Backup &amp;amp; Point-in-Time Restore]]&lt;br /&gt;
: Continuous backups enabling self-service restore to any timestamp in the retention window.&lt;br /&gt;
; [[Customer-Managed Keys]]&lt;br /&gt;
: Encrypt data at rest using a key you control in Azure Key Vault.&lt;br /&gt;
; [[Data Encryption Key (DEK)]]&lt;br /&gt;
: for Always Encrypted in Azure Cosmos DB, you must use the Azure Cosmos DB SDK (C#, Java, or Node.js).&lt;br /&gt;
; [[RBAC for Data Plane]]&lt;br /&gt;
: Fine-grained Microsoft Entra ID permissions for data operations, avoiding shared account keys.&lt;br /&gt;
; [[Cosmos DB Operator]]&lt;br /&gt;
: Provisions accounts, databases, and containers; cannot access data or use Data Explorer.&lt;br /&gt;
; [[Cosmos DB Account Reader Role]]&lt;br /&gt;
: Can read Azure Cosmos DB account data; cannot provision resources or make changes.&lt;br /&gt;
; [[Cosmos Backup Operator]]&lt;br /&gt;
: Submits a restore request for a periodic backup-enabled database or container.&lt;br /&gt;
; [[CosmosRestoreOperator]]&lt;br /&gt;
: Performs the restore action for an account in continuous backup mode.&lt;br /&gt;
; [[Always Encrypted]]&lt;br /&gt;
: Client-side encryption ensuring Cosmos DB never sees plaintext values of protected properties.&lt;br /&gt;
; [[Azure Data Factory (Data Movement)]]&lt;br /&gt;
: Pipeline-based ETL/ELT service for moving data into/out of Cosmos DB.&lt;br /&gt;
; [[ARM Templates (Infrastructure as Code)]]&lt;br /&gt;
: Declarative, version-controlled provisioning of Cosmos DB resources as code.&lt;br /&gt;
; [[log-analytics]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;DP-420: Designing and Implementing Cloud-Native Applications Using Microsoft Azure Cosmos DB — terminology reference&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[Category:DP-420 Terminology]]&lt;/div&gt;</summary>
		<author><name>Anko</name></author>
	</entry>
	<entry>
		<id>https://ilianko.com/index.php?title=Test&amp;diff=6250</id>
		<title>Test</title>
		<link rel="alternate" type="text/html" href="https://ilianko.com/index.php?title=Test&amp;diff=6250"/>
		<updated>2026-10-26T15:07:46Z</updated>

		<summary type="html">&lt;p&gt;Anko: Recreated DP-420 term page: test (Uncategorized)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;amp;larr; Back to [[DP-420: Azure Cosmos DB Developer Specialty|DP-420 Terminology Reference]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Category:&#039;&#039;&#039; Uncategorized&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;DP-420: Designing and Implementing Cloud-Native Applications Using Microsoft Azure Cosmos DB — term detail page&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[Category:DP-420 Terminology]]&lt;br /&gt;
[[Category:Uncategorized]]&lt;/div&gt;</summary>
		<author><name>Anko</name></author>
	</entry>
	<entry>
		<id>https://ilianko.com/index.php?title=Log-analytics&amp;diff=6249</id>
		<title>Log-analytics</title>
		<link rel="alternate" type="text/html" href="https://ilianko.com/index.php?title=Log-analytics&amp;diff=6249"/>
		<updated>2026-10-26T15:07:46Z</updated>

		<summary type="html">&lt;p&gt;Anko: Recreated DP-420 term page: log-analytics (Maintenance &amp;amp; Security)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;amp;larr; Back to [[DP-420: Azure Cosmos DB Developer Specialty|DP-420 Terminology Reference]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Category:&#039;&#039;&#039; Maintenance &amp;amp; Security&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
It can save data in:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
| Table                            | Purpose                                    | When to Use                        | DP-420 Keywords                                           |&lt;br /&gt;
| -------------------------------- | ------------------------------------------ | ---------------------------------- | --------------------------------------------------------- |&lt;br /&gt;
| **CDBDataPlaneRequests**         | Individual requests made against Cosmos DB | Troubleshoot specific operations   | Request charge, latency, 429, point read, query           |&lt;br /&gt;
| **CDBDataPlaneRequests5M**       | Aggregated metrics over 5-minute windows   | Trend analysis and dashboards      | Throughput trends, average latency, request counts        |&lt;br /&gt;
| **CDBPartitionKeyRUConsumption** | RU consumption per partition key           | Find hot partitions                | Hot partition, skewed workload, RU distribution           |&lt;br /&gt;
| **CDBPartitionKeyStatistics**    | Statistics about partition key usage       | Analyze partitioning effectiveness | Partition cardinality, partition growth, partition design |&lt;br /&gt;
| **CDBQueryRuntimeStatistics**    | Query execution details                    | Optimize queries                   | Index utilization, query performance, scans               |&lt;br /&gt;
            &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Send to Log Analytics workspace&lt;br /&gt;
* Send to storage account&lt;br /&gt;
* Send to event hub&lt;br /&gt;
* Send to another Azure Monitor log&lt;br /&gt;
* Send to Azure&lt;br /&gt;
&lt;br /&gt;
== More Info &amp;amp; Links ==&lt;br /&gt;
* [https://learn.microsoft.com/en-us/azure/cosmos-db/nosql/log-analytics/tutorial-kql Microsoft Learn: Tutorial - Write KQL queries to monitor Azure Cosmos DB]&lt;br /&gt;
* [https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/ Microsoft Learn: Overview of Kusto Query Language (KQL)]&lt;br /&gt;
* [https://learn.microsoft.com/en-us/azure/cosmos-db/monitor-resource-logs Microsoft Learn: Monitor and troubleshoot Azure Cosmos DB using diagnostic logs]&lt;br /&gt;
&lt;br /&gt;
== DP-420 Style Practice Questions ==&lt;br /&gt;
&#039;&#039;&#039;Q1.&#039;&#039;&#039; What is the primary role of KQL (Kusto Query Language) in Azure Cosmos DB operations and troubleshooting?&lt;br /&gt;
* A. Querying and analyzing diagnostic logs and metrics in Azure Monitor Log Analytics to troubleshoot issues like throttling, hot partitions, and expensive queries&lt;br /&gt;
* B. Defining server-side stored procedures and triggers directly in Cosmos DB containers&lt;br /&gt;
* C. Querying JSON documents via the Cosmos DB API for NoSQL endpoint&lt;br /&gt;
* D. Creating and managing Cosmos DB indexing policies declaratively&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q2.&#039;&#039;&#039; In a KQL query for Azure Cosmos DB logs, what does the pipe (|) operator represent?&lt;br /&gt;
* A. It pipes the tabular output of the preceding operator as the input to the next operator in a data-flow pipeline&lt;br /&gt;
* B. It performs a logical bitwise OR between two numeric fields&lt;br /&gt;
* C. It defines a primary key constraint on the diagnostic table&lt;br /&gt;
* D. It separates alternative partition key values in a point read&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q3.&#039;&#039;&#039; Which resource-specific table would you query using KQL to inspect RU charges and HTTP status codes for individual data operations?&lt;br /&gt;
* A. CDBDataPlaneRequests&lt;br /&gt;
* B. CDBControlPlaneRequests&lt;br /&gt;
* C. CDBPartitionKeyStatistics&lt;br /&gt;
* D. AzureMetrics&lt;br /&gt;
&lt;br /&gt;
== Answer Key ==&lt;br /&gt;
&#039;&#039;Answers are listed at the very end so you can attempt the questions first.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Q1 (KQL (Kusto Query Language)):&#039;&#039;&#039; A. Querying and analyzing diagnostic logs and metrics in Azure Monitor Log Analytics to troubleshoot issues like throttling, hot partitions, and expensive queries — KQL is the read-only query language for Azure Monitor Log Analytics used to analyze diagnostic logs like CDBDataPlaneRequests and CDBPartitionKeyRUConsumption.&lt;br /&gt;
* &#039;&#039;&#039;Q2 (KQL (Kusto Query Language)):&#039;&#039;&#039; A. It pipes the tabular output of the preceding operator as the input to the next operator in a data-flow pipeline — KQL uses the pipe (|) operator to pass data sequentially from one tabular expression/operator to another (e.g., filtering with where, then aggregating with summarize).&lt;br /&gt;
* &#039;&#039;&#039;Q3 (KQL (Kusto Query Language)):&#039;&#039;&#039; A. CDBDataPlaneRequests — CDBDataPlaneRequests logs individual data-plane operations along with RequestCharge, StatusCode, DurationMs, and ActivityId.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;DP-420: Designing and Implementing Cloud-Native Applications Using Microsoft Azure Cosmos DB — term detail page&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[Category:DP-420 Terminology]]&lt;br /&gt;
[[Category:Maintenance &amp;amp; Security]]&lt;/div&gt;</summary>
		<author><name>Anko</name></author>
	</entry>
	<entry>
		<id>https://ilianko.com/index.php?title=IsTombstone&amp;diff=6248</id>
		<title>IsTombstone</title>
		<link rel="alternate" type="text/html" href="https://ilianko.com/index.php?title=IsTombstone&amp;diff=6248"/>
		<updated>2026-10-26T15:07:46Z</updated>

		<summary type="html">&lt;p&gt;Anko: Recreated DP-420 term page: isTombstone (Client Connectivity &amp;amp; SDK)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;amp;larr; Back to [[DP-420: Azure Cosmos DB Developer Specialty|DP-420 Terminology Reference]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Category:&#039;&#039;&#039; Client Connectivity &amp;amp; SDK&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
Tombstone in Azure Cosmos DB: When an item is deleted from a container, Azure Cosmos DB marks the item as a &amp;quot;tombstone&amp;quot; to ensure that the deletion is propagated correctly across all replicas in a distributed system. This ensures that the deleted item does not reappear after a replica catches up or after a period of network partition.   For DP-420, if you see tombstones, think:  Change Feed  Delete notifications  All Versions and Deletes mode  CDC (similar to SQL Server Change Data Capture)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
| Mode                          | Creates | Updates | Deletes        |&lt;br /&gt;
| ----------------------------- | ------- | ------- | -------------- |&lt;br /&gt;
| Latest Version Mode           | ✅       | ✅       | ❌              |&lt;br /&gt;
| All Versions and Deletes Mode | ✅       | ✅       | ✅ (tombstones) |&lt;br /&gt;
&lt;br /&gt;
      &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== More Info &amp;amp; Links ==&lt;br /&gt;
* [https://learn.microsoft.com/en-us/azure/cosmos-db/nosql/conceptual-resilient-sdk-applications Microsoft Learn: Handling rate limiting / request rate too large]&lt;br /&gt;
&lt;br /&gt;
== DP-420 Style Practice Questions ==&lt;br /&gt;
&#039;&#039;&#039;Q1.&#039;&#039;&#039; What does a 429 error from Azure Cosmos DB typically indicate?&lt;br /&gt;
* A. The request was throttled because provisioned throughput (RU/s) was exceeded&lt;br /&gt;
* B. The requested item does not exist&lt;br /&gt;
* C. An authentication failure occurred&lt;br /&gt;
* D. A conflict occurred during multi-region writes&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q2.&#039;&#039;&#039; Which of these could help reduce the frequency of 429 errors?&lt;br /&gt;
* A. Improving partition key distribution to avoid hot partitions, or increasing provisioned RU/s&lt;br /&gt;
* B. Disabling the SDK&#039;s automatic retry policy&lt;br /&gt;
* C. Switching to gateway mode exclusively&lt;br /&gt;
* D. Reducing the number of properties indexed&lt;br /&gt;
&lt;br /&gt;
== Answer Key ==&lt;br /&gt;
&#039;&#039;Answers are listed at the very end so you can attempt the questions first.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Q1 (429 Throttling Error):&#039;&#039;&#039; A. The request was throttled because provisioned throughput (RU/s) was exceeded — A 429 status code means the request rate exceeded the provisioned RU/s, triggering throttling.&lt;br /&gt;
* &#039;&#039;&#039;Q2 (429 Throttling Error):&#039;&#039;&#039; A. Improving partition key distribution to avoid hot partitions, or increasing provisioned RU/s — Better partition key distribution and/or higher provisioned throughput both help reduce 429 throttling errors.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;DP-420: Designing and Implementing Cloud-Native Applications Using Microsoft Azure Cosmos DB — term detail page&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[Category:DP-420 Terminology]]&lt;br /&gt;
[[Category:Client Connectivity &amp;amp; SDK]]&lt;/div&gt;</summary>
		<author><name>Anko</name></author>
	</entry>
	<entry>
		<id>https://ilianko.com/index.php?title=ARM_Templates_(Infrastructure_as_Code)&amp;diff=6247</id>
		<title>ARM Templates (Infrastructure as Code)</title>
		<link rel="alternate" type="text/html" href="https://ilianko.com/index.php?title=ARM_Templates_(Infrastructure_as_Code)&amp;diff=6247"/>
		<updated>2026-10-26T15:07:45Z</updated>

		<summary type="html">&lt;p&gt;Anko: Recreated DP-420 term page: ARM Templates (Infrastructure as Code) (Maintenance &amp;amp; Security)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;amp;larr; Back to [[DP-420: Azure Cosmos DB Developer Specialty|DP-420 Terminology Reference]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Category:&#039;&#039;&#039; Maintenance &amp;amp; Security&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Summary:&#039;&#039;&#039; Declarative, version-controlled provisioning of Cosmos DB resources as code.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
Azure Resource Manager (ARM) templates (and equivalents like Bicep) allow you to declaratively define and provision Azure Cosmos DB resources — accounts, databases, containers, throughput settings, and indexing policies — as code, enabling repeatable, version-controlled deployments as part of a DevOps process, as opposed to imperative, manual configuration through the Azure portal or CLI commands.&lt;br /&gt;
&lt;br /&gt;
== More Info &amp;amp; Links ==&lt;br /&gt;
* [https://learn.microsoft.com/en-us/azure/cosmos-db/manage-with-templates Microsoft Learn: Manage Azure Cosmos DB resources with ARM templates]&lt;br /&gt;
&lt;br /&gt;
== DP-420 Style Practice Questions ==&lt;br /&gt;
&#039;&#039;&#039;Q1.&#039;&#039;&#039; What is the main advantage of provisioning Azure Cosmos DB resources using ARM templates instead of the Azure portal?&lt;br /&gt;
* A. Declarative, repeatable, and version-controlled infrastructure as code&lt;br /&gt;
* B. Lower RU cost for provisioned throughput&lt;br /&gt;
* C. Automatic point-in-time restore&lt;br /&gt;
* D. Elimination of the need for a partition key&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q2.&#039;&#039;&#039; Which of these can be maintained in production using ARM templates, per the DP-420 objectives?&lt;br /&gt;
* A. Indexing policies&lt;br /&gt;
* B. The account&#039;s region priority list only&lt;br /&gt;
* C. The change feed estimator&lt;br /&gt;
* D. The integrated cache&lt;br /&gt;
&lt;br /&gt;
== Answer Key ==&lt;br /&gt;
&#039;&#039;Answers are listed at the very end so you can attempt the questions first.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Q1 (ARM Templates (Infrastructure as Code)):&#039;&#039;&#039; A. Declarative, repeatable, and version-controlled infrastructure as code — ARM templates provide declarative, repeatable infrastructure-as-code deployments suitable for DevOps pipelines.&lt;br /&gt;
* &#039;&#039;&#039;Q2 (ARM Templates (Infrastructure as Code)):&#039;&#039;&#039; A. Indexing policies — The DP-420 objectives specifically call out maintaining indexing policies in production using ARM templates.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;DP-420: Designing and Implementing Cloud-Native Applications Using Microsoft Azure Cosmos DB — term detail page&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[Category:DP-420 Terminology]]&lt;br /&gt;
[[Category:Maintenance &amp;amp; Security]]&lt;/div&gt;</summary>
		<author><name>Anko</name></author>
	</entry>
	<entry>
		<id>https://ilianko.com/index.php?title=Azure_Data_Factory_(Data_Movement)&amp;diff=6246</id>
		<title>Azure Data Factory (Data Movement)</title>
		<link rel="alternate" type="text/html" href="https://ilianko.com/index.php?title=Azure_Data_Factory_(Data_Movement)&amp;diff=6246"/>
		<updated>2026-10-26T15:07:45Z</updated>

		<summary type="html">&lt;p&gt;Anko: Recreated DP-420 term page: Azure Data Factory (Data Movement) (Maintenance &amp;amp; Security)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;amp;larr; Back to [[DP-420: Azure Cosmos DB Developer Specialty|DP-420 Terminology Reference]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Category:&#039;&#039;&#039; Maintenance &amp;amp; Security&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Summary:&#039;&#039;&#039; Pipeline-based ETL/ELT service for moving data into/out of Cosmos DB.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
Azure Data Factory is a cloud ETL/ELT service that can be used to move data into or out of Azure Cosmos DB as part of pipeline-based data movement strategies — such as bulk-loading data from other sources, or migrating/copying data between Cosmos DB accounts or containers — as an alternative to using SDK bulk operations, Kafka connectors, or Stream Analytics for data movement.&lt;br /&gt;
&lt;br /&gt;
== More Info &amp;amp; Links ==&lt;br /&gt;
* [https://learn.microsoft.com/en-us/azure/data-factory/connector-azure-cosmos-db Microsoft Learn: Copy data to/from Azure Cosmos DB using ADF]&lt;br /&gt;
&lt;br /&gt;
== DP-420 Style Practice Questions ==&lt;br /&gt;
&#039;&#039;&#039;Q1.&#039;&#039;&#039; Which Azure service provides pipeline-based ETL/ELT capabilities for moving data into or out of Azure Cosmos DB?&lt;br /&gt;
* A. Azure Data Factory&lt;br /&gt;
* B. Azure Bastion&lt;br /&gt;
* C. Azure Front Door&lt;br /&gt;
* D. Azure DNS&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q2.&#039;&#039;&#039; Besides Azure Data Factory, which of these is also a valid data movement option for Azure Cosmos DB mentioned in the DP-420 objectives?&lt;br /&gt;
* A. A Kafka connector&lt;br /&gt;
* B. Always Encrypted&lt;br /&gt;
* C. A composite index&lt;br /&gt;
* D. A trigger&lt;br /&gt;
&lt;br /&gt;
== Answer Key ==&lt;br /&gt;
&#039;&#039;Answers are listed at the very end so you can attempt the questions first.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Q1 (Azure Data Factory (Data Movement)):&#039;&#039;&#039; A. Azure Data Factory — Azure Data Factory (and Azure Synapse pipelines) provide pipeline-based data movement capabilities for Cosmos DB.&lt;br /&gt;
* &#039;&#039;&#039;Q2 (Azure Data Factory (Data Movement)):&#039;&#039;&#039; A. A Kafka connector — The DP-420 objectives list SDK bulk operations, ADF/Synapse pipelines, a Kafka connector, Stream Analytics, and the Spark connector as data movement options.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;DP-420: Designing and Implementing Cloud-Native Applications Using Microsoft Azure Cosmos DB — term detail page&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[Category:DP-420 Terminology]]&lt;br /&gt;
[[Category:Maintenance &amp;amp; Security]]&lt;/div&gt;</summary>
		<author><name>Anko</name></author>
	</entry>
	<entry>
		<id>https://ilianko.com/index.php?title=Always_Encrypted&amp;diff=6245</id>
		<title>Always Encrypted</title>
		<link rel="alternate" type="text/html" href="https://ilianko.com/index.php?title=Always_Encrypted&amp;diff=6245"/>
		<updated>2026-10-26T15:07:45Z</updated>

		<summary type="html">&lt;p&gt;Anko: Recreated DP-420 term page: Always Encrypted (Maintenance &amp;amp; Security)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;amp;larr; Back to [[DP-420: Azure Cosmos DB Developer Specialty|DP-420 Terminology Reference]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Category:&#039;&#039;&#039; Maintenance &amp;amp; Security&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Summary:&#039;&#039;&#039; Client-side encryption ensuring Cosmos DB never sees plaintext values of protected properties.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
Always Encrypted for Azure Cosmos DB is a client-side encryption feature that encrypts sensitive data (specific properties) before it leaves the client application, ensuring that even Azure Cosmos DB itself never sees the plaintext values. Encryption and decryption happen using keys managed by the client, typically backed by Azure Key Vault, providing strong protection for highly sensitive fields.&lt;br /&gt;
&lt;br /&gt;
== More Info &amp;amp; Links ==&lt;br /&gt;
* [https://learn.microsoft.com/en-us/azure/cosmos-db/how-to-always-encrypted Microsoft Learn: Always Encrypted for Azure Cosmos DB]&lt;br /&gt;
&lt;br /&gt;
== DP-420 Style Practice Questions ==&lt;br /&gt;
&#039;&#039;&#039;Q1.&#039;&#039;&#039; What does Always Encrypted for Azure Cosmos DB protect against?&lt;br /&gt;
* A. Azure Cosmos DB (and anyone with access to the service) ever seeing plaintext values of protected properties&lt;br /&gt;
* B. Network-level attacks only&lt;br /&gt;
* C. Only attacks that occur during backup and restore&lt;br /&gt;
* D. Loss of the primary account key only&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q2.&#039;&#039;&#039; Where does encryption/decryption occur when using Always Encrypted?&lt;br /&gt;
* A. On the client side, before data leaves the application&lt;br /&gt;
* B. On the Cosmos DB server, before storage&lt;br /&gt;
* C. In transit only, using TLS&lt;br /&gt;
* D. Only during backup operations&lt;br /&gt;
&lt;br /&gt;
== Answer Key ==&lt;br /&gt;
&#039;&#039;Answers are listed at the very end so you can attempt the questions first.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Q1 (Always Encrypted):&#039;&#039;&#039; A. Azure Cosmos DB (and anyone with access to the service) ever seeing plaintext values of protected properties — Always Encrypted ensures the database service itself never has access to plaintext values, protecting against server-side exposure.&lt;br /&gt;
* &#039;&#039;&#039;Q2 (Always Encrypted):&#039;&#039;&#039; A. On the client side, before data leaves the application — Always Encrypted performs client-side encryption/decryption, so sensitive data is never exposed in plaintext to the service.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;DP-420: Designing and Implementing Cloud-Native Applications Using Microsoft Azure Cosmos DB — term detail page&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[Category:DP-420 Terminology]]&lt;br /&gt;
[[Category:Maintenance &amp;amp; Security]]&lt;/div&gt;</summary>
		<author><name>Anko</name></author>
	</entry>
	<entry>
		<id>https://ilianko.com/index.php?title=CosmosRestoreOperator&amp;diff=6244</id>
		<title>CosmosRestoreOperator</title>
		<link rel="alternate" type="text/html" href="https://ilianko.com/index.php?title=CosmosRestoreOperator&amp;diff=6244"/>
		<updated>2026-10-26T15:07:44Z</updated>

		<summary type="html">&lt;p&gt;Anko: Recreated DP-420 term page: CosmosRestoreOperator (Maintenance &amp;amp; Security)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;amp;larr; Back to [[DP-420: Azure Cosmos DB Developer Specialty|DP-420 Terminology Reference]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Category:&#039;&#039;&#039; Maintenance &amp;amp; Security&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Summary:&#039;&#039;&#039; Performs the restore action for an account in continuous backup mode.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
CosmosRestoreOperator is a built-in Azure RBAC (control-plane) role that can perform a restore action for an Azure Cosmos DB account in continuous backup mode, without granting broader account management or item data access permissions. This complements Cosmos Backup Operator, which instead submits restore requests for periodic backup-enabled databases/containers — the appropriate role depends on which backup mode (Periodic Backup or Continuous Backup &amp;amp; Point-in-Time Restore) the account uses.&lt;br /&gt;
&lt;br /&gt;
== More Info &amp;amp; Links ==&lt;br /&gt;
* [https://learn.microsoft.com/en-us/azure/role-based-access-control/built-in-roles/databases#cosmosrestoreoperator Microsoft Learn: Azure built-in roles for Azure Cosmos DB]&lt;br /&gt;
&lt;br /&gt;
== DP-420 Style Practice Questions ==&lt;br /&gt;
&#039;&#039;&#039;Q1.&#039;&#039;&#039; What permission does the CosmosRestoreOperator role grant?&lt;br /&gt;
* A. The ability to perform a restore action for an account in continuous backup mode&lt;br /&gt;
* B. The ability to submit a periodic backup restore request&lt;br /&gt;
* C. The ability to read item data using Data Explorer&lt;br /&gt;
* D. The ability to provision new databases and containers&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q2.&#039;&#039;&#039; Which role would you assign to submit a restore request for a periodic backup-enabled container instead?&lt;br /&gt;
* A. Cosmos Backup Operator&lt;br /&gt;
* B. Cosmos DB Operator&lt;br /&gt;
* C. Cosmos DB Account Reader Role&lt;br /&gt;
* D. CosmosRestoreOperator&lt;br /&gt;
&lt;br /&gt;
== Answer Key ==&lt;br /&gt;
&#039;&#039;Answers are listed at the very end so you can attempt the questions first.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Q1 (CosmosRestoreOperator):&#039;&#039;&#039; A. The ability to perform a restore action for an account in continuous backup mode — CosmosRestoreOperator specifically enables restoring an account that has continuous backup mode enabled.&lt;br /&gt;
* &#039;&#039;&#039;Q2 (CosmosRestoreOperator):&#039;&#039;&#039; A. Cosmos Backup Operator — Cosmos Backup Operator is used for periodic backup restore requests, while CosmosRestoreOperator applies to continuous backup mode.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;DP-420: Designing and Implementing Cloud-Native Applications Using Microsoft Azure Cosmos DB — term detail page&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[Category:DP-420 Terminology]]&lt;br /&gt;
[[Category:Maintenance &amp;amp; Security]]&lt;/div&gt;</summary>
		<author><name>Anko</name></author>
	</entry>
	<entry>
		<id>https://ilianko.com/index.php?title=Cosmos_Backup_Operator&amp;diff=6243</id>
		<title>Cosmos Backup Operator</title>
		<link rel="alternate" type="text/html" href="https://ilianko.com/index.php?title=Cosmos_Backup_Operator&amp;diff=6243"/>
		<updated>2026-10-26T15:07:44Z</updated>

		<summary type="html">&lt;p&gt;Anko: Recreated DP-420 term page: Cosmos Backup Operator (Maintenance &amp;amp; Security)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;amp;larr; Back to [[DP-420: Azure Cosmos DB Developer Specialty|DP-420 Terminology Reference]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Category:&#039;&#039;&#039; Maintenance &amp;amp; Security&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Summary:&#039;&#039;&#039; Submits a restore request for a periodic backup-enabled database or container.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
Cosmos Backup Operator is a built-in Azure RBAC (control-plane) role that can submit a restore request from the Azure portal for a periodic backup-enabled database or container, without granting the ability to read or write item data. This is distinct from CosmosRestoreOperator, which instead performs a restore action for an account configured in continuous backup mode — the two roles apply to the two different backup modes (Periodic Backup vs. Continuous Backup &amp;amp; Point-in-Time Restore).&lt;br /&gt;
&lt;br /&gt;
== More Info &amp;amp; Links ==&lt;br /&gt;
* [https://learn.microsoft.com/en-us/azure/role-based-access-control/built-in-roles/databases#cosmos-backup-operator Microsoft Learn: Azure built-in roles for Azure Cosmos DB]&lt;br /&gt;
&lt;br /&gt;
== DP-420 Style Practice Questions ==&lt;br /&gt;
&#039;&#039;&#039;Q1.&#039;&#039;&#039; What does the Cosmos Backup Operator built-in role allow?&lt;br /&gt;
* A. Submitting a restore request from the Azure portal for a periodic backup-enabled database or container&lt;br /&gt;
* B. Restoring a continuous-backup-enabled account directly&lt;br /&gt;
* C. Reading and writing items directly&lt;br /&gt;
* D. Provisioning new Azure Cosmos DB accounts&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q2.&#039;&#039;&#039; How does Cosmos Backup Operator differ from CosmosRestoreOperator?&lt;br /&gt;
* A. Backup Operator submits restore requests for periodic backup, while CosmosRestoreOperator performs restores for continuous backup accounts&lt;br /&gt;
* B. They are the same role with two names&lt;br /&gt;
* C. Backup Operator can read item data, but CosmosRestoreOperator cannot&lt;br /&gt;
* D. CosmosRestoreOperator only works with periodic backup mode&lt;br /&gt;
&lt;br /&gt;
== Answer Key ==&lt;br /&gt;
&#039;&#039;Answers are listed at the very end so you can attempt the questions first.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Q1 (Cosmos Backup Operator):&#039;&#039;&#039; A. Submitting a restore request from the Azure portal for a periodic backup-enabled database or container — Cosmos Backup Operator submits restore requests for periodic backup-enabled databases/containers, not for continuous backup accounts.&lt;br /&gt;
* &#039;&#039;&#039;Q2 (Cosmos Backup Operator):&#039;&#039;&#039; A. Backup Operator submits restore requests for periodic backup, while CosmosRestoreOperator performs restores for continuous backup accounts — Cosmos Backup Operator handles periodic backup restore requests, whereas CosmosRestoreOperator restores accounts in continuous backup mode.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;DP-420: Designing and Implementing Cloud-Native Applications Using Microsoft Azure Cosmos DB — term detail page&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[Category:DP-420 Terminology]]&lt;br /&gt;
[[Category:Maintenance &amp;amp; Security]]&lt;/div&gt;</summary>
		<author><name>Anko</name></author>
	</entry>
	<entry>
		<id>https://ilianko.com/index.php?title=Cosmos_DB_Account_Reader_Role&amp;diff=6242</id>
		<title>Cosmos DB Account Reader Role</title>
		<link rel="alternate" type="text/html" href="https://ilianko.com/index.php?title=Cosmos_DB_Account_Reader_Role&amp;diff=6242"/>
		<updated>2026-10-26T15:07:44Z</updated>

		<summary type="html">&lt;p&gt;Anko: Recreated DP-420 term page: Cosmos DB Account Reader Role (Maintenance &amp;amp; Security)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;amp;larr; Back to [[DP-420: Azure Cosmos DB Developer Specialty|DP-420 Terminology Reference]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Category:&#039;&#039;&#039; Maintenance &amp;amp; Security&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Summary:&#039;&#039;&#039; Can read Azure Cosmos DB account data; cannot provision resources or make changes.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
Cosmos DB Account Reader Role is a built-in Azure RBAC (control-plane) role that can read Azure Cosmos DB account data — including viewing account configuration and reading item data — without permission to make any changes to the account or its resources. It is commonly assigned to auditors, monitoring tools, or team members who need read visibility into an account without provisioning rights (contrast with Cosmos DB Operator, which can provision resources but not read data).&lt;br /&gt;
&lt;br /&gt;
== More Info &amp;amp; Links ==&lt;br /&gt;
* [https://learn.microsoft.com/en-us/azure/role-based-access-control/built-in-roles/databases#cosmosdb-account-reader-role Microsoft Learn: Azure built-in roles for Azure Cosmos DB]&lt;br /&gt;
&lt;br /&gt;
== DP-420 Style Practice Questions ==&lt;br /&gt;
&#039;&#039;&#039;Q1.&#039;&#039;&#039; What does the Cosmos DB Account Reader Role permit?&lt;br /&gt;
* A. Reading Azure Cosmos DB account data and configuration, without making changes&lt;br /&gt;
* B. Provisioning new databases and containers&lt;br /&gt;
* C. Restoring a deleted account from continuous backup&lt;br /&gt;
* D. Submitting a periodic backup restore request&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q2.&#039;&#039;&#039; How does Cosmos DB Account Reader Role differ from Cosmos DB Operator?&lt;br /&gt;
* A. Account Reader can read account data but cannot provision resources, while Cosmos DB Operator can provision resources but cannot access data&lt;br /&gt;
* B. They are identical roles with different names&lt;br /&gt;
* C. Account Reader can restore accounts, while Cosmos DB Operator cannot&lt;br /&gt;
* D. Cosmos DB Operator can read data but not provision resources&lt;br /&gt;
&lt;br /&gt;
== Answer Key ==&lt;br /&gt;
&#039;&#039;Answers are listed at the very end so you can attempt the questions first.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Q1 (Cosmos DB Account Reader Role):&#039;&#039;&#039; A. Reading Azure Cosmos DB account data and configuration, without making changes — This role provides read access to account data/configuration but no ability to modify resources or provision new ones.&lt;br /&gt;
* &#039;&#039;&#039;Q2 (Cosmos DB Account Reader Role):&#039;&#039;&#039; A. Account Reader can read account data but cannot provision resources, while Cosmos DB Operator can provision resources but cannot access data — Account Reader is read-focused on data/configuration, whereas Cosmos DB Operator is focused on provisioning without data access.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;DP-420: Designing and Implementing Cloud-Native Applications Using Microsoft Azure Cosmos DB — term detail page&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[Category:DP-420 Terminology]]&lt;br /&gt;
[[Category:Maintenance &amp;amp; Security]]&lt;/div&gt;</summary>
		<author><name>Anko</name></author>
	</entry>
	<entry>
		<id>https://ilianko.com/index.php?title=Cosmos_DB_Operator&amp;diff=6241</id>
		<title>Cosmos DB Operator</title>
		<link rel="alternate" type="text/html" href="https://ilianko.com/index.php?title=Cosmos_DB_Operator&amp;diff=6241"/>
		<updated>2026-10-26T15:07:43Z</updated>

		<summary type="html">&lt;p&gt;Anko: Recreated DP-420 term page: Cosmos DB Operator (Maintenance &amp;amp; Security)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;amp;larr; Back to [[DP-420: Azure Cosmos DB Developer Specialty|DP-420 Terminology Reference]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Category:&#039;&#039;&#039; Maintenance &amp;amp; Security&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Summary:&#039;&#039;&#039; Provisions accounts, databases, and containers; cannot access data or use Data Explorer.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
Cosmos DB Operator is a built-in Azure RBAC (control-plane/ARM) role that lets you provision Azure Cosmos DB accounts, databases, and containers, but cannot access any data (item reads/writes) or use Data Explorer, and cannot read account keys/connection strings. It is distinct from Cosmos DB Account Reader Role (which can read account data), Cosmos Backup Operator (which manages periodic backup restore requests), and CosmosRestoreOperator (which restores continuous-backup accounts) — Cosmos DB Operator is purely about provisioning infrastructure.&lt;br /&gt;
&lt;br /&gt;
== More Info &amp;amp; Links ==&lt;br /&gt;
* [https://learn.microsoft.com/en-us/azure/role-based-access-control/built-in-roles/databases#cosmos-db-operator Microsoft Learn: Azure built-in roles for Azure Cosmos DB]&lt;br /&gt;
&lt;br /&gt;
== DP-420 Style Practice Questions ==&lt;br /&gt;
&#039;&#039;&#039;Q1.&#039;&#039;&#039; What can the Cosmos DB Operator built-in role do?&lt;br /&gt;
* A. Provision Azure Cosmos DB accounts, databases, and containers, without accessing data or using Data Explorer&lt;br /&gt;
* B. Read item data using Data Explorer&lt;br /&gt;
* C. Restore a deleted Azure Cosmos DB account&lt;br /&gt;
* D. Submit a periodic backup restore request&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q2.&#039;&#039;&#039; Why does the Cosmos DB Operator role exclude access to Data Explorer and account data?&lt;br /&gt;
* A. To enforce least privilege, separating infrastructure provisioning from data access&lt;br /&gt;
* B. Because it is a deprecated role&lt;br /&gt;
* C. Because it only applies to the MongoDB API&lt;br /&gt;
* D. Because data access is managed exclusively through Cosmos Backup Operator&lt;br /&gt;
&lt;br /&gt;
== Answer Key ==&lt;br /&gt;
&#039;&#039;Answers are listed at the very end so you can attempt the questions first.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Q1 (Cosmos DB Operator):&#039;&#039;&#039; A. Provision Azure Cosmos DB accounts, databases, and containers, without accessing data or using Data Explorer — Cosmos DB Operator can provision accounts, databases, and containers, but explicitly cannot access data or use Data Explorer.&lt;br /&gt;
* &#039;&#039;&#039;Q2 (Cosmos DB Operator):&#039;&#039;&#039; A. To enforce least privilege, separating infrastructure provisioning from data access — Excluding Data Explorer/data access lets an operator provision resources (control plane) without being able to read or modify the actual data (data plane).&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;DP-420: Designing and Implementing Cloud-Native Applications Using Microsoft Azure Cosmos DB — term detail page&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[Category:DP-420 Terminology]]&lt;br /&gt;
[[Category:Maintenance &amp;amp; Security]]&lt;/div&gt;</summary>
		<author><name>Anko</name></author>
	</entry>
	<entry>
		<id>https://ilianko.com/index.php?title=RBAC_for_Data_Plane&amp;diff=6240</id>
		<title>RBAC for Data Plane</title>
		<link rel="alternate" type="text/html" href="https://ilianko.com/index.php?title=RBAC_for_Data_Plane&amp;diff=6240"/>
		<updated>2026-10-26T15:07:43Z</updated>

		<summary type="html">&lt;p&gt;Anko: Recreated DP-420 term page: RBAC for Data Plane (Maintenance &amp;amp; Security)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;amp;larr; Back to [[DP-420: Azure Cosmos DB Developer Specialty|DP-420 Terminology Reference]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Category:&#039;&#039;&#039; Maintenance &amp;amp; Security&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Summary:&#039;&#039;&#039; Fine-grained Microsoft Entra ID permissions for data operations, avoiding shared account keys.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
Azure Cosmos DB supports Azure role-based access control (RBAC) for data plane operations, allowing you to grant fine-grained permissions (read, write, specific operations) to Microsoft Entra ID identities for accessing data within containers, as an alternative or complement to using primary/secondary account keys, improving security by avoiding shared-secret key distribution.&lt;br /&gt;
&lt;br /&gt;
== More Info &amp;amp; Links ==&lt;br /&gt;
* [https://learn.microsoft.com/en-us/azure/cosmos-db/nosql/security/how-to-grant-data-plane-role-based-access Microsoft Learn: Configure RBAC for data plane]&lt;br /&gt;
&lt;br /&gt;
== DP-420 Style Practice Questions ==&lt;br /&gt;
&#039;&#039;&#039;Q1.&#039;&#039;&#039; What does data plane RBAC allow you to control in Azure Cosmos DB?&lt;br /&gt;
* A. Fine-grained permissions for Microsoft Entra ID identities to access and operate on data&lt;br /&gt;
* B. Which Azure regions data is replicated to&lt;br /&gt;
* C. The container&#039;s indexing policy&lt;br /&gt;
* D. The account&#039;s consistency level&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q2.&#039;&#039;&#039; What is an advantage of using Microsoft Entra ID-based data plane RBAC over primary/secondary account keys?&lt;br /&gt;
* A. It avoids distributing shared-secret keys and enables fine-grained, identity-based permissions&lt;br /&gt;
* B. It automatically enables multi-region writes&lt;br /&gt;
* C. It removes the need for TLS encryption&lt;br /&gt;
* D. It disables the need for a partition key&lt;br /&gt;
&lt;br /&gt;
== Answer Key ==&lt;br /&gt;
&#039;&#039;Answers are listed at the very end so you can attempt the questions first.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Q1 (RBAC for Data Plane):&#039;&#039;&#039; A. Fine-grained permissions for Microsoft Entra ID identities to access and operate on data — Data plane RBAC controls what data operations specific Microsoft Entra ID identities are permitted to perform.&lt;br /&gt;
* &#039;&#039;&#039;Q2 (RBAC for Data Plane):&#039;&#039;&#039; A. It avoids distributing shared-secret keys and enables fine-grained, identity-based permissions — RBAC with Microsoft Entra ID avoids shared-secret key distribution and allows more granular, auditable access control.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;DP-420: Designing and Implementing Cloud-Native Applications Using Microsoft Azure Cosmos DB — term detail page&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[Category:DP-420 Terminology]]&lt;br /&gt;
[[Category:Maintenance &amp;amp; Security]]&lt;/div&gt;</summary>
		<author><name>Anko</name></author>
	</entry>
	<entry>
		<id>https://ilianko.com/index.php?title=Data_Encryption_Key_(DEK)&amp;diff=6239</id>
		<title>Data Encryption Key (DEK)</title>
		<link rel="alternate" type="text/html" href="https://ilianko.com/index.php?title=Data_Encryption_Key_(DEK)&amp;diff=6239"/>
		<updated>2026-10-26T15:07:43Z</updated>

		<summary type="html">&lt;p&gt;Anko: Recreated DP-420 term page: Data Encryption Key (DEK) (Maintenance &amp;amp; Security)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;amp;larr; Back to [[DP-420: Azure Cosmos DB Developer Specialty|DP-420 Terminology Reference]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Category:&#039;&#039;&#039; Maintenance &amp;amp; Security&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Summary:&#039;&#039;&#039; for Always Encrypted in Azure Cosmos DB, you must use the Azure Cosmos DB SDK (C#, Java, or Node.js).&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
Here is the sequence to create and use a Data Encryption Key (DEK):&lt;br /&gt;
&lt;br /&gt;
# &#039;&#039;&#039;Create the Key Encryption Key (KEK):&#039;&#039;&#039; Before creating a DEK, you must create a master key in Azure Key Vault to protect it. Create a new RSA key in your vault, navigate to its current version, and copy the full Key Identifier (URI).&lt;br /&gt;
# &#039;&#039;&#039;Grant the Client Application Access to the KEK:&#039;&#039;&#039; The application running the Cosmos DB SDK needs permission to wrap and unwrap the DEK. Assign your application&#039;s Managed Identity permissions to the Key Vault to grant Get, List, Wrap Key, Unwrap Key, Verify, and Sign access.&lt;br /&gt;
# &#039;&#039;&#039;Initialize the Cosmos DB Client with a Key Resolver:&#039;&#039;&#039; In your application code, attach a Key Resolver to your Cosmos DB client instance so it can authenticate with Key Vault using the DefaultAzureCredential.&lt;br /&gt;
** &#039;&#039;&#039;C#:&#039;&#039;&#039; Use KeyResolver and .WithEncryption() when building the CosmosClient.&lt;br /&gt;
** &#039;&#039;&#039;Java:&#039;&#039;&#039; Use KeyEncryptionKeyClientBuilder.&lt;br /&gt;
** &#039;&#039;&#039;JavaScript/TypeScript:&#039;&#039;&#039; Pass an AzureKeyVaultEncryptionKeyResolver into the clientEncryptionOptions.&lt;br /&gt;
&lt;br /&gt;
# &#039;&#039;&#039;Create the DEK via the SDK:&#039;&#039;&#039; Call the CreateClientEncryptionKey method on your Cosmos DB Database object, passing:&lt;br /&gt;
** A unique string identifier for this DEK.&lt;br /&gt;
** The encryption algorithm (AEAD_AES_256_CBC_HMAC_SHA256).&lt;br /&gt;
** The KEK URI you copied in the first step.&lt;br /&gt;
&lt;br /&gt;
# &#039;&#039;&#039;Apply the DEK to a Container:&#039;&#039;&#039; When creating a new Cosmos DB container, define a ClientEncryptionPolicy. Specify which exact JSON properties should be encrypted, map them to your DEK&#039;s string identifier, and choose either Deterministic or Randomized encryption.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once configured, your application will automatically request the wrapped DEK from Cosmos DB, decrypt it locally using Azure Key Vault, and seamlessly encrypt your properties before sending the data.&lt;br /&gt;
&lt;br /&gt;
# Create DEK&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
await database.CreateClientEncryptionKeyAsync(&lt;br /&gt;
    id: &amp;quot;dek1&amp;quot;,&lt;br /&gt;
    encryptionAlgorithm:&lt;br /&gt;
        DataEncryptionKeyEncryptionAlgorithm&lt;br /&gt;
            .AeadAes256CbcHmacSha256,&lt;br /&gt;
    encryptionKeyWrapMetadata: metadata);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Use encryption&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
new CosmosClientBuilder(endpoint, credential)&lt;br /&gt;
    .WithEncryption(keyResolver, keyStoreProvider)&lt;br /&gt;
    .Build();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Create DEK&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
await database.CreateClientEncryptionKeyAsync(&lt;br /&gt;
    id: &amp;quot;dek1&amp;quot;,&lt;br /&gt;
    encryptionAlgorithm:&lt;br /&gt;
        DataEncryptionKeyEncryptionAlgorithm&lt;br /&gt;
            .AeadAes256CbcHmacSha256,&lt;br /&gt;
    encryptionKeyWrapMetadata: metadata);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
# C# ClientEncryptionPolicy&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ClientEncryptionPolicy encryptionPolicy =&lt;br /&gt;
    new ClientEncryptionPolicy(&lt;br /&gt;
        new List&lt;br /&gt;
        {&lt;br /&gt;
            new ClientEncryptionIncludedPath&lt;br /&gt;
            {&lt;br /&gt;
                Path = &amp;quot;/email&amp;quot;,&lt;br /&gt;
                ClientEncryptionKeyId = &amp;quot;dek1&amp;quot;,&lt;br /&gt;
                EncryptionType =&lt;br /&gt;
                    ClientEncryptionEncryptionType.Deterministic,&lt;br /&gt;
                EncryptionAlgorithm =&lt;br /&gt;
                    DataEncryptionKeyEncryptionAlgorithm&lt;br /&gt;
                        .AeadAes256CbcHmacSha256&lt;br /&gt;
            },&lt;br /&gt;
            new ClientEncryptionIncludedPath&lt;br /&gt;
            {&lt;br /&gt;
                Path = &amp;quot;/ssn&amp;quot;,&lt;br /&gt;
                ClientEncryptionKeyId = &amp;quot;dek1&amp;quot;,&lt;br /&gt;
                EncryptionType =&lt;br /&gt;
                    ClientEncryptionEncryptionType.Randomized,&lt;br /&gt;
                EncryptionAlgorithm =&lt;br /&gt;
                    DataEncryptionKeyEncryptionAlgorithm&lt;br /&gt;
                        .AeadAes256CbcHmacSha256&lt;br /&gt;
            }&lt;br /&gt;
        });&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        ContainerProperties properties =&lt;br /&gt;
    new ContainerProperties(&lt;br /&gt;
        id: &amp;quot;Customers&amp;quot;,&lt;br /&gt;
        partitionKeyPath: &amp;quot;/customerId&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
properties.ClientEncryptionPolicy = encryptionPolicy;&lt;br /&gt;
&lt;br /&gt;
await database.CreateContainerAsync(properties);&lt;br /&gt;
&lt;br /&gt;
//If the policy contains: Plain Text&lt;br /&gt;
// /email -&amp;amp;gt; Deterministic&lt;br /&gt;
// SELECT * FROM c WHERE c.email = &amp;quot;john@contoso.com&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Create DEK&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CreateClientEncryptionKeyAsync()&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
1. Create KEK&lt;br /&gt;
2. Grant Key Vault permissions&lt;br /&gt;
3. Configure Cosmos Client&lt;br /&gt;
4. Create DEK&lt;br /&gt;
5. Create Encryption Policy&lt;br /&gt;
6. Create Container&lt;br /&gt;
7. Read/Write encrypted data&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== More Info &amp;amp; Links ==&lt;br /&gt;
* [https://learn.microsoft.com/en-us/azure/cosmos-db/how-to-setup-cmk Microsoft Learn: Customer-managed keys]&lt;br /&gt;
&lt;br /&gt;
== DP-420 Style Practice Questions ==&lt;br /&gt;
&#039;&#039;&#039;Q1.&#039;&#039;&#039; What is the main advantage of using customer-managed keys (CMK) over platform-managed keys?&lt;br /&gt;
* A. Full control over encryption key management, rotation, and revocation via Azure Key Vault&lt;br /&gt;
* B. Lower cost than platform-managed keys&lt;br /&gt;
* C. Elimination of the need to configure network access control&lt;br /&gt;
* D. Automatic multi-region writes&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q2.&#039;&#039;&#039; Where are customer-managed keys typically stored and managed for Azure Cosmos DB?&lt;br /&gt;
* A. Azure Key Vault&lt;br /&gt;
* B. Inside the Cosmos DB container itself&lt;br /&gt;
* C. In the application&#039;s source code&lt;br /&gt;
* D. In Azure Active Directory Connect&lt;br /&gt;
&lt;br /&gt;
== Answer Key ==&lt;br /&gt;
&#039;&#039;Answers are listed at the very end so you can attempt the questions first.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Q1 (Customer-Managed Keys):&#039;&#039;&#039; A. Full control over encryption key management, rotation, and revocation via Azure Key Vault — CMK gives the customer control over key lifecycle management, useful for meeting specific compliance requirements.&lt;br /&gt;
* &#039;&#039;&#039;Q2 (Customer-Managed Keys):&#039;&#039;&#039; A. Azure Key Vault — Customer-managed keys are stored and managed in Azure Key Vault, which Azure Cosmos DB references for encryption operations.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;DP-420: Designing and Implementing Cloud-Native Applications Using Microsoft Azure Cosmos DB — term detail page&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[Category:DP-420 Terminology]]&lt;br /&gt;
[[Category:Maintenance &amp;amp; Security]]&lt;/div&gt;</summary>
		<author><name>Anko</name></author>
	</entry>
	<entry>
		<id>https://ilianko.com/index.php?title=Customer-Managed_Keys&amp;diff=6238</id>
		<title>Customer-Managed Keys</title>
		<link rel="alternate" type="text/html" href="https://ilianko.com/index.php?title=Customer-Managed_Keys&amp;diff=6238"/>
		<updated>2026-10-26T15:07:42Z</updated>

		<summary type="html">&lt;p&gt;Anko: Recreated DP-420 term page: Customer-Managed Keys (Maintenance &amp;amp; Security)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;amp;larr; Back to [[DP-420: Azure Cosmos DB Developer Specialty|DP-420 Terminology Reference]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Category:&#039;&#039;&#039; Maintenance &amp;amp; Security&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Summary:&#039;&#039;&#039; Encrypt data at rest using a key you control in Azure Key Vault.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
Customer-managed keys (CMK) allow you to encrypt Azure Cosmos DB data at rest using an encryption key that you control and manage in Azure Key Vault, rather than relying solely on Microsoft&#039;s platform-managed keys. This gives organizations control over key rotation, revocation, and compliance requirements, at the cost of additional operational responsibility for key management.&lt;br /&gt;
&lt;br /&gt;
# &#039;&#039;&#039;Step 1: Prepare the Azure Key Vault&#039;&#039;&#039; Create or select an Azure Key Vault. You must ensure three specific settings are configured on the vault:&lt;br /&gt;
** Soft Delete and Purge Protection must be enabled (required by Cosmos DB to prevent accidental key loss).&lt;br /&gt;
** Permission model must be set to Azure role-based access control (RBAC) (required to grant permissions to a specific key rather than the whole vault).&lt;br /&gt;
&lt;br /&gt;
# &#039;&#039;&#039;Step 2: Generate the Key and Assign Granular Permissions&#039;&#039;&#039; Inside your Key Vault, generate the encryption key and immediately lock down who can use it:&lt;br /&gt;
** Generate a new key (an RSA key size of 3072 or higher is recommended).&lt;br /&gt;
** Once generated, select that specific key, click on its Access control (IAM) menu, and add a role assignment.&lt;br /&gt;
** Assign the Key Vault Crypto Service Encryption User role to the Azure Cosmos DB principal.&lt;br /&gt;
** Before leaving the screen, copy the key&#039;s Key Identifier (URI).&lt;br /&gt;
&lt;br /&gt;
# &#039;&#039;&#039;Step 3: Create the Azure Cosmos DB Account&#039;&#039;&#039; During the creation of your new Azure Cosmos DB account in the Azure portal, navigate to the Encryption tab. Select Customer-managed key and paste the Key URI you copied in Step 2. Cosmos DB will validate its access to that specific key and encrypt the new account.&lt;br /&gt;
&lt;br /&gt;
== More Info &amp;amp; Links ==&lt;br /&gt;
* [https://learn.microsoft.com/en-us/azure/cosmos-db/how-to-setup-cmk Microsoft Learn: Customer-managed keys]&lt;br /&gt;
&lt;br /&gt;
== DP-420 Style Practice Questions ==&lt;br /&gt;
&#039;&#039;&#039;Q1.&#039;&#039;&#039; What is the main advantage of using customer-managed keys (CMK) over platform-managed keys?&lt;br /&gt;
* A. Full control over encryption key management, rotation, and revocation via Azure Key Vault&lt;br /&gt;
* B. Lower cost than platform-managed keys&lt;br /&gt;
* C. Elimination of the need to configure network access control&lt;br /&gt;
* D. Automatic multi-region writes&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q2.&#039;&#039;&#039; Where are customer-managed keys typically stored and managed for Azure Cosmos DB?&lt;br /&gt;
* A. Azure Key Vault&lt;br /&gt;
* B. Inside the Cosmos DB container itself&lt;br /&gt;
* C. In the application&#039;s source code&lt;br /&gt;
* D. In Azure Active Directory Connect&lt;br /&gt;
&lt;br /&gt;
== Answer Key ==&lt;br /&gt;
&#039;&#039;Answers are listed at the very end so you can attempt the questions first.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Q1 (Customer-Managed Keys):&#039;&#039;&#039; A. Full control over encryption key management, rotation, and revocation via Azure Key Vault — CMK gives the customer control over key lifecycle management, useful for meeting specific compliance requirements.&lt;br /&gt;
* &#039;&#039;&#039;Q2 (Customer-Managed Keys):&#039;&#039;&#039; A. Azure Key Vault — Customer-managed keys are stored and managed in Azure Key Vault, which Azure Cosmos DB references for encryption operations.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;DP-420: Designing and Implementing Cloud-Native Applications Using Microsoft Azure Cosmos DB — term detail page&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[Category:DP-420 Terminology]]&lt;br /&gt;
[[Category:Maintenance &amp;amp; Security]]&lt;/div&gt;</summary>
		<author><name>Anko</name></author>
	</entry>
	<entry>
		<id>https://ilianko.com/index.php?title=Continuous_Backup_%26_Point-in-Time_Restore&amp;diff=6237</id>
		<title>Continuous Backup &amp; Point-in-Time Restore</title>
		<link rel="alternate" type="text/html" href="https://ilianko.com/index.php?title=Continuous_Backup_%26_Point-in-Time_Restore&amp;diff=6237"/>
		<updated>2026-10-26T15:07:42Z</updated>

		<summary type="html">&lt;p&gt;Anko: Recreated DP-420 term page: Continuous Backup &amp;amp; Point-in-Time Restore (Maintenance &amp;amp; Security)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;amp;larr; Back to [[DP-420: Azure Cosmos DB Developer Specialty|DP-420 Terminology Reference]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Category:&#039;&#039;&#039; Maintenance &amp;amp; Security&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Summary:&#039;&#039;&#039; Continuous backups enabling self-service restore to any timestamp in the retention window.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
Continuous backup mode continuously backs up Azure Cosmos DB data, enabling self-service point-in-time restore (PITR) to any timestamp within the retention period (7 or 30 days depending on tier), without needing to contact support. This is useful for recovering from accidental data deletion/corruption or application bugs with much finer granularity than periodic backup.&lt;br /&gt;
&lt;br /&gt;
Azure Cosmos DB accounts with periodic mode backup policy can be migrated to continuous mode using the Azure portal, Azure CLI, Azure PowerShell, or Bicep templates. Migration from periodic to continuous mode is one-way and isn&#039;t reversible. After you migrate from periodic to continuous mode, you get the benefits of continuous mode.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// Set the backup policy for the Azure Cosmos DB account&lt;br /&gt;
AccountUpdateParameters accountUpdateParameters = new AccountUpdateParameters()&lt;br /&gt;
{ &lt;br /&gt;
    BackupPolicy = new ContinuousBackupPolicy()&lt;br /&gt;
    { &lt;br /&gt;
        Type = BackupPolicyType.Continuous,&lt;br /&gt;
    }&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
await databaseAccount.ReplaceAccountAsync(accountUpdateParameters);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
az cosmosdb update --resource-group &amp;quot;&amp;quot; --name &amp;quot;&amp;quot; \&lt;br /&gt;
  --backup-policy-type &amp;quot;Continuous&amp;quot; --continuous-tier &amp;quot;Continuous7Days&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
   &#039;&#039;&#039;Feature / Configuration&#039;&#039;&#039; &#039;&#039;&#039;Periodic Backup (Default)&#039;&#039;&#039; &#039;&#039;&#039;Continuous Backup (Point-in-Time)&#039;&#039;&#039;     &#039;&#039;&#039;Restore Mechanism&#039;&#039;&#039; Requires submitting an Azure support ticket. Self-service Point-in-Time Restore (PITR) via portal/CLI.   &#039;&#039;&#039;Retention Window&#039;&#039;&#039; Configurable up to 1 month (720 hours). Fixed tiers: 7-day, 30-day, or 35-day.   &#039;&#039;&#039;Backup Interval&#039;&#039;&#039; Configurable (minimum 1 hour). Continuous ongoing backup (no interval required).   &#039;&#039;&#039;Storage Redundancy&#039;&#039;&#039; Replicated to a paired region via Geo-Redundant Storage (GRS). Stored locally in the account&#039;s existing regions (not automatically geo-resistant).   &#039;&#039;&#039;Supported APIs&#039;&#039;&#039; All Azure Cosmos DB APIs. SQL, MongoDB, Gremlin, and Table (Cassandra is not supported).   &#039;&#039;&#039;Cost Structure&#039;&#039;&#039; Default (2 copies) is free. Billed for additional copies/retention. 7-day storage is free. 30/35-day tiers incur storage costs. All restores incur a fee.   &#039;&#039;&#039;Migration&#039;&#039;&#039; Can be migrated to Continuous mode. &#039;&#039;&#039;One-way only:&#039;&#039;&#039; Cannot revert back to Periodic.   &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Restored&lt;br /&gt;
Data plane&lt;br /&gt;
Databases&lt;br /&gt;
Containers&lt;br /&gt;
Items/documents&lt;br /&gt;
Throughput&lt;br /&gt;
&lt;br /&gt;
❌ Not restored&lt;br /&gt;
Control plane&lt;br /&gt;
Networking&lt;br /&gt;
Security&lt;br /&gt;
Regional settings&lt;br /&gt;
Consistency settings&lt;br /&gt;
Programmability objects (Sprocs, Triggers, UDFs)&lt;br /&gt;
External integrations&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== More Info &amp;amp; Links ==&lt;br /&gt;
* [https://learn.microsoft.com/en-us/azure/cosmos-db/continuous-backup-restore-introduction Microsoft Learn: Continuous backup and point-in-time restore]&lt;br /&gt;
&lt;br /&gt;
== DP-420 Style Practice Questions ==&lt;br /&gt;
&#039;&#039;&#039;Q1.&#039;&#039;&#039; What capability does continuous backup mode enable that periodic backup does not?&lt;br /&gt;
* A. Self-service point-in-time restore to any timestamp within the retention window&lt;br /&gt;
* B. Multi-region writes&lt;br /&gt;
* C. Automatic index optimization&lt;br /&gt;
* D. Free throughput&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q2.&#039;&#039;&#039; Do you need to contact Microsoft support to perform a restore under continuous backup mode?&lt;br /&gt;
* A. No, restores can be self-service, initiated by the account owner&lt;br /&gt;
* B. Yes, a support ticket is always required&lt;br /&gt;
* C. Only for restores older than 24 hours&lt;br /&gt;
* D. Only when using the Cassandra API&lt;br /&gt;
&lt;br /&gt;
== Answer Key ==&lt;br /&gt;
&#039;&#039;Answers are listed at the very end so you can attempt the questions first.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Q1 (Continuous Backup &amp;amp; Point-in-Time Restore):&#039;&#039;&#039; A. Self-service point-in-time restore to any timestamp within the retention window — Continuous backup enables self-service point-in-time restore to virtually any moment within the retention period.&lt;br /&gt;
* &#039;&#039;&#039;Q2 (Continuous Backup &amp;amp; Point-in-Time Restore):&#039;&#039;&#039; A. No, restores can be self-service, initiated by the account owner — Continuous backup allows account owners to self-service restore without needing to open a support request.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;DP-420: Designing and Implementing Cloud-Native Applications Using Microsoft Azure Cosmos DB — term detail page&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[Category:DP-420 Terminology]]&lt;br /&gt;
[[Category:Maintenance &amp;amp; Security]]&lt;/div&gt;</summary>
		<author><name>Anko</name></author>
	</entry>
	<entry>
		<id>https://ilianko.com/index.php?title=Periodic_Backup&amp;diff=6236</id>
		<title>Periodic Backup</title>
		<link rel="alternate" type="text/html" href="https://ilianko.com/index.php?title=Periodic_Backup&amp;diff=6236"/>
		<updated>2026-10-26T15:07:41Z</updated>

		<summary type="html">&lt;p&gt;Anko: Recreated DP-420 term page: Periodic Backup (Maintenance &amp;amp; Security)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;amp;larr; Back to [[DP-420: Azure Cosmos DB Developer Specialty|DP-420 Terminology Reference]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Category:&#039;&#039;&#039; Maintenance &amp;amp; Security&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Summary:&#039;&#039;&#039; Original backup mode; scheduled snapshots, typically restored via a support request.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
Periodic backup is Azure Cosmos DB&#039;s original backup mode, which automatically takes backups of the account at a configurable interval (default every 4 hours) and retains a configurable number of backups, allowing restoration of an entire account to a previous backup point — typically requiring a support request to restore, and offering less granularity than continuous backup.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Exam shortcut:&#039;&#039;&#039; &amp;quot;Where are Periodic Backup backups stored by default?&amp;quot; → In the write region and geo-replicated to the Azure paired region (GRS).&lt;br /&gt;
&lt;br /&gt;
* Periodic Backup → Contact Microsoft/Azure Support ✅&lt;br /&gt;
* Continuous Backup → Use self-service restore (RBAC permissions required) ✅&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
| Backup type | CosmosRestoreOperator needed? |&lt;br /&gt;
| ----------- | ----------------------------- |&lt;br /&gt;
| Periodic    | **No**                        |&lt;br /&gt;
| Continuous  | **Yes**                       |&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== More Info &amp;amp; Links ==&lt;br /&gt;
* [https://learn.microsoft.com/en-us/azure/cosmos-db/periodic-backup-restore-introduction Microsoft Learn: Periodic backup mode]&lt;br /&gt;
&lt;br /&gt;
== DP-420 Style Practice Questions ==&lt;br /&gt;
&#039;&#039;&#039;Q1.&#039;&#039;&#039; How does periodic backup mode restore data?&lt;br /&gt;
* A. By restoring from the most recent scheduled backup snapshot, typically via a support request&lt;br /&gt;
* B. Automatically, to any exact second within the retention window, without support involvement&lt;br /&gt;
* C. Only by exporting a manual snapshot triggered by the developer&lt;br /&gt;
* D. By replaying the change feed from the beginning&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q2.&#039;&#039;&#039; What is a key limitation of periodic backup compared to continuous backup?&lt;br /&gt;
* A. Restores are limited to the granularity of the scheduled backup interval, not an exact point in time&lt;br /&gt;
* B. Periodic backup cannot be configured with any retention period&lt;br /&gt;
* C. Periodic backup only works with the MongoDB API&lt;br /&gt;
* D. Periodic backup requires multi-region writes to be enabled&lt;br /&gt;
&lt;br /&gt;
== Answer Key ==&lt;br /&gt;
&#039;&#039;Answers are listed at the very end so you can attempt the questions first.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Q1 (Periodic Backup):&#039;&#039;&#039; A. By restoring from the most recent scheduled backup snapshot, typically via a support request — Periodic backup restores from scheduled backup snapshots and traditionally requires contacting support to initiate.&lt;br /&gt;
* &#039;&#039;&#039;Q2 (Periodic Backup):&#039;&#039;&#039; A. Restores are limited to the granularity of the scheduled backup interval, not an exact point in time — Periodic backup only allows restoring to backup snapshot points, unlike continuous backup&#039;s fine-grained point-in-time restore.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;DP-420: Designing and Implementing Cloud-Native Applications Using Microsoft Azure Cosmos DB — term detail page&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[Category:DP-420 Terminology]]&lt;br /&gt;
[[Category:Maintenance &amp;amp; Security]]&lt;/div&gt;</summary>
		<author><name>Anko</name></author>
	</entry>
	<entry>
		<id>https://ilianko.com/index.php?title=KQL_(Kusto_Query_Language)&amp;diff=6235</id>
		<title>KQL (Kusto Query Language)</title>
		<link rel="alternate" type="text/html" href="https://ilianko.com/index.php?title=KQL_(Kusto_Query_Language)&amp;diff=6235"/>
		<updated>2026-10-26T15:07:41Z</updated>

		<summary type="html">&lt;p&gt;Anko: Recreated DP-420 term page: KQL (Kusto Query Language) (Maintenance &amp;amp; Security)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;amp;larr; Back to [[DP-420: Azure Cosmos DB Developer Specialty|DP-420 Terminology Reference]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Category:&#039;&#039;&#039; Maintenance &amp;amp; Security&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Summary:&#039;&#039;&#039; Query language used in Azure Monitor Log Analytics to analyze Cosmos DB diagnostic logs and metrics.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
KQL (Kusto Query Language) is the read-only query language used to explore, analyze, and aggregate telemetry and diagnostic data in Azure Monitor Log Analytics, Azure Data Explorer, and Microsoft Fabric Real-Time Intelligence. In the context of Azure Cosmos DB and the DP-420 exam, KQL is used to query diagnostic log tables — such as CDBDataPlaneRequests, CDBQueryRuntimeStatistics, CDBPartitionKeyRUConsumption, and CDBControlPlaneRequests (or legacy AzureDiagnostics) — to analyze RU consumption patterns, troubleshoot HTTP 429 throttling errors, identify hot partitions, and pinpoint high-cost or slow queries. KQL queries are built using a pipeline model where data flows from left to right through tabular operators separated by the pipe (|) character, such as where, project, summarize, join, order by, and render.&lt;br /&gt;
&lt;br /&gt;
Example 1 (KQL): Find operations throttled with HTTP 429 status code&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CDBDataPlaneRequests&lt;br /&gt;
| where TimeGenerated &amp;amp;gt; ago(24h)&lt;br /&gt;
| where StatusCode == 429&lt;br /&gt;
| summarize Count429 = count() by bin(TimeGenerated, 5m), OperationName, PartitionKey&lt;br /&gt;
| order by Count429 desc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This query identifies requests that were rate-limited (HTTP 429) across 5-minute intervals in the last 24 hours, grouping by operation and partition key to isolate hot partitions causing throttling.&lt;br /&gt;
&lt;br /&gt;
Example 2 (KQL): Correlate high RU queries with query text&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CDBDataPlaneRequests&lt;br /&gt;
| where TimeGenerated &amp;amp;gt; ago(1h) and todouble(RequestCharge) &amp;amp;gt; 50.0&lt;br /&gt;
| project TimeGenerated, ActivityId, RequestCharge, DurationMs&lt;br /&gt;
| join kind=inner (&lt;br /&gt;
    CDBQueryRuntimeStatistics&lt;br /&gt;
    | project ActivityId, QueryText&lt;br /&gt;
) on $left.ActivityId == $right.ActivityId&lt;br /&gt;
| order by RequestCharge desc&lt;br /&gt;
| limit 20&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This query correlates request execution telemetry from &amp;lt;code&amp;gt;CDBDataPlaneRequests&amp;lt;/code&amp;gt; with query text from &amp;lt;code&amp;gt;CDBQueryRuntimeStatistics&amp;lt;/code&amp;gt; via &amp;lt;code&amp;gt;ActivityId&amp;lt;/code&amp;gt; to find the top 20 most expensive queries.&lt;br /&gt;
&lt;br /&gt;
== More Info &amp;amp; Links ==&lt;br /&gt;
* [https://learn.microsoft.com/en-us/azure/cosmos-db/nosql/log-analytics/tutorial-kql Microsoft Learn: Tutorial - Write KQL queries to monitor Azure Cosmos DB]&lt;br /&gt;
* [https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/ Microsoft Learn: Overview of Kusto Query Language (KQL)]&lt;br /&gt;
* [https://learn.microsoft.com/en-us/azure/cosmos-db/monitor-resource-logs Microsoft Learn: Monitor and troubleshoot Azure Cosmos DB using diagnostic logs]&lt;br /&gt;
&lt;br /&gt;
== DP-420 Style Practice Questions ==&lt;br /&gt;
&#039;&#039;&#039;Q1.&#039;&#039;&#039; What is the primary role of KQL (Kusto Query Language) in Azure Cosmos DB operations and troubleshooting?&lt;br /&gt;
* A. Querying and analyzing diagnostic logs and metrics in Azure Monitor Log Analytics to troubleshoot issues like throttling, hot partitions, and expensive queries&lt;br /&gt;
* B. Defining server-side stored procedures and triggers directly in Cosmos DB containers&lt;br /&gt;
* C. Querying JSON documents via the Cosmos DB API for NoSQL endpoint&lt;br /&gt;
* D. Creating and managing Cosmos DB indexing policies declaratively&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q2.&#039;&#039;&#039; In a KQL query for Azure Cosmos DB logs, what does the pipe (|) operator represent?&lt;br /&gt;
* A. It pipes the tabular output of the preceding operator as the input to the next operator in a data-flow pipeline&lt;br /&gt;
* B. It performs a logical bitwise OR between two numeric fields&lt;br /&gt;
* C. It defines a primary key constraint on the diagnostic table&lt;br /&gt;
* D. It separates alternative partition key values in a point read&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q3.&#039;&#039;&#039; Which resource-specific table would you query using KQL to inspect RU charges and HTTP status codes for individual data operations?&lt;br /&gt;
* A. CDBDataPlaneRequests&lt;br /&gt;
* B. CDBControlPlaneRequests&lt;br /&gt;
* C. CDBPartitionKeyStatistics&lt;br /&gt;
* D. AzureMetrics&lt;br /&gt;
&lt;br /&gt;
== Answer Key ==&lt;br /&gt;
&#039;&#039;Answers are listed at the very end so you can attempt the questions first.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Q1 (KQL (Kusto Query Language)):&#039;&#039;&#039; A. Querying and analyzing diagnostic logs and metrics in Azure Monitor Log Analytics to troubleshoot issues like throttling, hot partitions, and expensive queries — KQL is the read-only query language for Azure Monitor Log Analytics used to analyze diagnostic logs like CDBDataPlaneRequests and CDBPartitionKeyRUConsumption.&lt;br /&gt;
* &#039;&#039;&#039;Q2 (KQL (Kusto Query Language)):&#039;&#039;&#039; A. It pipes the tabular output of the preceding operator as the input to the next operator in a data-flow pipeline — KQL uses the pipe (|) operator to pass data sequentially from one tabular expression/operator to another (e.g., filtering with where, then aggregating with summarize).&lt;br /&gt;
* &#039;&#039;&#039;Q3 (KQL (Kusto Query Language)):&#039;&#039;&#039; A. CDBDataPlaneRequests — CDBDataPlaneRequests logs individual data-plane operations along with RequestCharge, StatusCode, DurationMs, and ActivityId.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;DP-420: Designing and Implementing Cloud-Native Applications Using Microsoft Azure Cosmos DB — term detail page&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[Category:DP-420 Terminology]]&lt;br /&gt;
[[Category:Maintenance &amp;amp; Security]]&lt;/div&gt;</summary>
		<author><name>Anko</name></author>
	</entry>
	<entry>
		<id>https://ilianko.com/index.php?title=DataPlaneRequests_(Diagnostic_Log)&amp;diff=6234</id>
		<title>DataPlaneRequests (Diagnostic Log)</title>
		<link rel="alternate" type="text/html" href="https://ilianko.com/index.php?title=DataPlaneRequests_(Diagnostic_Log)&amp;diff=6234"/>
		<updated>2026-10-26T15:07:41Z</updated>

		<summary type="html">&lt;p&gt;Anko: Recreated DP-420 term page: DataPlaneRequests (Diagnostic Log) (Maintenance &amp;amp; Security)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;amp;larr; Back to [[DP-420: Azure Cosmos DB Developer Specialty|DP-420 Terminology Reference]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Category:&#039;&#039;&#039; Maintenance &amp;amp; Security&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Summary:&#039;&#039;&#039; Logs item-level create/read/replace/delete/query operations with RU charge and duration.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
DataPlaneRequests is a diagnostic log table that logs individual data-plane operations — such as item creates, reads, replaces, deletes, and queries — executed against an Azure Cosmos DB for NoSQL account, including details like RU charge, status code, and duration per request. It complements ControlPlaneRequests (which logs account-level administrative operations) by giving request-level visibility into the actual application traffic hitting the account, useful for deep troubleshooting of latency, throttling (429s), or unexpected RU charges. In Log Analytics, this table is exposed under the name CDBDataPlaneRequests.&lt;br /&gt;
&lt;br /&gt;
Example (KQL): Find the most expensive queries and their text&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CDBDataPlaneRequests&lt;br /&gt;
| where todouble(RequestCharge) &amp;amp;gt; 10.0&lt;br /&gt;
| project ActivityId, RequestCharge&lt;br /&gt;
| join kind=inner (&lt;br /&gt;
    CDBQueryRuntimeStatistics&lt;br /&gt;
    | project ActivityId, QueryText&lt;br /&gt;
) on $left.ActivityId == $right.ActivityId&lt;br /&gt;
| order by RequestCharge desc&lt;br /&gt;
| limit 100&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This query joins &amp;lt;code&amp;gt;CDBDataPlaneRequests&amp;lt;/code&amp;gt; (RU charge per request) with &amp;lt;code&amp;gt;CDBQueryRuntimeStatistics&amp;lt;/code&amp;gt; (the query text) on the shared &amp;lt;code&amp;gt;ActivityId&amp;lt;/code&amp;gt;, filters for requests costing more than 10 RUs, and returns the 100 most expensive queries together with their full query text — a common first step when troubleshooting unexpectedly high RU consumption.&lt;br /&gt;
&lt;br /&gt;
== More Info &amp;amp; Links ==&lt;br /&gt;
* [https://learn.microsoft.com/en-us/azure/cosmos-db/monitor-resource-logs Microsoft Learn: Monitor and troubleshoot using diagnostic logs]&lt;br /&gt;
&lt;br /&gt;
== DP-420 Style Practice Questions ==&lt;br /&gt;
&#039;&#039;&#039;Q1.&#039;&#039;&#039; What does the DataPlaneRequests diagnostic log table capture?&lt;br /&gt;
* A. Individual item-level operations (create, read, replace, delete, query) with details like RU charge and duration&lt;br /&gt;
* B. Account-level operations such as adding or removing regions&lt;br /&gt;
* C. Aggregated per-second RU consumption by partition key&lt;br /&gt;
* D. Estimated logical partition storage size&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q2.&#039;&#039;&#039; How does DataPlaneRequests differ from ControlPlaneRequests?&lt;br /&gt;
* A. DataPlaneRequests logs item-level operations (application traffic), while ControlPlaneRequests logs account-level administrative operations&lt;br /&gt;
* B. DataPlaneRequests only logs failed requests, while ControlPlaneRequests logs successful ones&lt;br /&gt;
* C. DataPlaneRequests is only available for the MongoDB API&lt;br /&gt;
* D. There is no difference; they are aliases for the same table&lt;br /&gt;
&lt;br /&gt;
== Answer Key ==&lt;br /&gt;
&#039;&#039;Answers are listed at the very end so you can attempt the questions first.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Q1 (DataPlaneRequests (Diagnostic Log)):&#039;&#039;&#039; A. Individual item-level operations (create, read, replace, delete, query) with details like RU charge and duration — DataPlaneRequests logs per-request data-plane operation details, including RU charge, status code, and duration.&lt;br /&gt;
* &#039;&#039;&#039;Q2 (DataPlaneRequests (Diagnostic Log)):&#039;&#039;&#039; A. DataPlaneRequests logs item-level operations (application traffic), while ControlPlaneRequests logs account-level administrative operations — DataPlaneRequests covers item-level read/write/query operations, whereas ControlPlaneRequests covers account/administrative changes.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;DP-420: Designing and Implementing Cloud-Native Applications Using Microsoft Azure Cosmos DB — term detail page&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[Category:DP-420 Terminology]]&lt;br /&gt;
[[Category:Maintenance &amp;amp; Security]]&lt;/div&gt;</summary>
		<author><name>Anko</name></author>
	</entry>
	<entry>
		<id>https://ilianko.com/index.php?title=ControlPlaneRequests_(Diagnostic_Log)&amp;diff=6233</id>
		<title>ControlPlaneRequests (Diagnostic Log)</title>
		<link rel="alternate" type="text/html" href="https://ilianko.com/index.php?title=ControlPlaneRequests_(Diagnostic_Log)&amp;diff=6233"/>
		<updated>2026-10-26T15:07:40Z</updated>

		<summary type="html">&lt;p&gt;Anko: Recreated DP-420 term page: ControlPlaneRequests (Diagnostic Log) (Maintenance &amp;amp; Security)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;amp;larr; Back to [[DP-420: Azure Cosmos DB Developer Specialty|DP-420 Terminology Reference]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Category:&#039;&#039;&#039; Maintenance &amp;amp; Security&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Summary:&#039;&#039;&#039; Logs account control-plane operations, e.g. adding/removing replication regions.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
ControlPlaneRequests is a diagnostic log table that logs control-plane operations performed against an Azure Cosmos DB for NoSQL account — such as adding or removing regions in the replication settings, updating throughput, or changing account-level configuration — as opposed to data-plane operations (item reads/writes). It is useful for auditing administrative changes to the account over time.&lt;br /&gt;
&lt;br /&gt;
== More Info &amp;amp; Links ==&lt;br /&gt;
* [https://learn.microsoft.com/en-us/azure/cosmos-db/monitor-resource-logs Microsoft Learn: Monitor and troubleshoot using diagnostic logs]&lt;br /&gt;
&lt;br /&gt;
== DP-420 Style Practice Questions ==&lt;br /&gt;
&#039;&#039;&#039;Q1.&#039;&#039;&#039; What kind of operations does the ControlPlaneRequests diagnostic log table capture?&lt;br /&gt;
* A. Account-level control-plane operations, such as adding or removing replication regions&lt;br /&gt;
* B. Item-level read and write operations&lt;br /&gt;
* C. Query execution statistics&lt;br /&gt;
* D. Change feed processor checkpoints&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q2.&#039;&#039;&#039; Why would you consult ControlPlaneRequests logs?&lt;br /&gt;
* A. To audit administrative changes such as region additions/removals or throughput updates over time&lt;br /&gt;
* B. To find which query consumed the most RUs&lt;br /&gt;
* C. To find which partition key is a hot partition&lt;br /&gt;
* D. To check TTL expiration events on items&lt;br /&gt;
&lt;br /&gt;
== Answer Key ==&lt;br /&gt;
&#039;&#039;Answers are listed at the very end so you can attempt the questions first.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Q1 (ControlPlaneRequests (Diagnostic Log)):&#039;&#039;&#039; A. Account-level control-plane operations, such as adding or removing replication regions — ControlPlaneRequests captures control-plane (account/administrative) operations, distinct from data-plane item operations.&lt;br /&gt;
* &#039;&#039;&#039;Q2 (ControlPlaneRequests (Diagnostic Log)):&#039;&#039;&#039; A. To audit administrative changes such as region additions/removals or throughput updates over time — This table is used to audit account-level configuration changes, which is distinct from data-plane monitoring tables.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;DP-420: Designing and Implementing Cloud-Native Applications Using Microsoft Azure Cosmos DB — term detail page&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[Category:DP-420 Terminology]]&lt;br /&gt;
[[Category:Maintenance &amp;amp; Security]]&lt;/div&gt;</summary>
		<author><name>Anko</name></author>
	</entry>
	<entry>
		<id>https://ilianko.com/index.php?title=QueryRuntimeStatistics_(Diagnostic_Log)&amp;diff=6232</id>
		<title>QueryRuntimeStatistics (Diagnostic Log)</title>
		<link rel="alternate" type="text/html" href="https://ilianko.com/index.php?title=QueryRuntimeStatistics_(Diagnostic_Log)&amp;diff=6232"/>
		<updated>2026-10-26T15:07:40Z</updated>

		<summary type="html">&lt;p&gt;Anko: Recreated DP-420 term page: QueryRuntimeStatistics (Diagnostic Log) (Maintenance &amp;amp; Security)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;amp;larr; Back to [[DP-420: Azure Cosmos DB Developer Specialty|DP-420 Terminology Reference]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Category:&#039;&#039;&#039; Maintenance &amp;amp; Security&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Summary:&#039;&#039;&#039; Logs query operations against the account for query performance analysis.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
QueryRuntimeStatistics is a diagnostic log table that logs query operations executed against an Azure Cosmos DB for NoSQL account, including details useful for analyzing query text, RU charge, and execution performance. It is commonly used alongside query metrics to identify expensive or inefficient queries that may benefit from indexing policy or query rewrites. In Log Analytics, this table is exposed under the name CDBQueryRuntimeStatistics.&lt;br /&gt;
&lt;br /&gt;
Example (KQL): Find the most expensive queries and their text&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CDBDataPlaneRequests&lt;br /&gt;
| where todouble(RequestCharge) &amp;amp;gt; 10.0&lt;br /&gt;
| project ActivityId, RequestCharge&lt;br /&gt;
| join kind=inner (&lt;br /&gt;
    CDBQueryRuntimeStatistics&lt;br /&gt;
    | project ActivityId, QueryText&lt;br /&gt;
) on $left.ActivityId == $right.ActivityId&lt;br /&gt;
| order by RequestCharge desc&lt;br /&gt;
| limit 100&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This query joins &amp;lt;code&amp;gt;CDBDataPlaneRequests&amp;lt;/code&amp;gt; (RU charge per request) with &amp;lt;code&amp;gt;CDBQueryRuntimeStatistics&amp;lt;/code&amp;gt; (the query text) on the shared &amp;lt;code&amp;gt;ActivityId&amp;lt;/code&amp;gt;, filters for requests costing more than 10 RUs, and returns the 100 most expensive queries together with their full query text — a common first step when troubleshooting unexpectedly high RU consumption.&lt;br /&gt;
&lt;br /&gt;
== More Info &amp;amp; Links ==&lt;br /&gt;
* [https://learn.microsoft.com/en-us/azure/cosmos-db/monitor-resource-logs Microsoft Learn: Monitor and troubleshoot using diagnostic logs]&lt;br /&gt;
&lt;br /&gt;
== DP-420 Style Practice Questions ==&lt;br /&gt;
&#039;&#039;&#039;Q1.&#039;&#039;&#039; What does the QueryRuntimeStatistics diagnostic log table capture?&lt;br /&gt;
* A. Details of query operations run against an Azure Cosmos DB for NoSQL account&lt;br /&gt;
* B. Per-partition storage size in KB&lt;br /&gt;
* C. Control-plane operations like adding a region&lt;br /&gt;
* D. Change feed consumer lag&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q2.&#039;&#039;&#039; Why would you review QueryRuntimeStatistics during optimization?&lt;br /&gt;
* A. To identify expensive or inefficient queries that might need indexing policy changes or rewrites&lt;br /&gt;
* B. To determine which partition key value has the most storage&lt;br /&gt;
* C. To check which regions accept writes&lt;br /&gt;
* D. To view the account&#039;s backup retention window&lt;br /&gt;
&lt;br /&gt;
== Answer Key ==&lt;br /&gt;
&#039;&#039;Answers are listed at the very end so you can attempt the questions first.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Q1 (QueryRuntimeStatistics (Diagnostic Log)):&#039;&#039;&#039; A. Details of query operations run against an Azure Cosmos DB for NoSQL account — QueryRuntimeStatistics logs details about queries executed against the account, useful for query performance analysis.&lt;br /&gt;
* &#039;&#039;&#039;Q2 (QueryRuntimeStatistics (Diagnostic Log)):&#039;&#039;&#039; A. To identify expensive or inefficient queries that might need indexing policy changes or rewrites — This table helps surface costly or slow queries so their indexing policy or query text can be optimized.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;DP-420: Designing and Implementing Cloud-Native Applications Using Microsoft Azure Cosmos DB — term detail page&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[Category:DP-420 Terminology]]&lt;br /&gt;
[[Category:Maintenance &amp;amp; Security]]&lt;/div&gt;</summary>
		<author><name>Anko</name></author>
	</entry>
	<entry>
		<id>https://ilianko.com/index.php?title=PartitionKeyStatistics_(Diagnostic_Log)&amp;diff=6231</id>
		<title>PartitionKeyStatistics (Diagnostic Log)</title>
		<link rel="alternate" type="text/html" href="https://ilianko.com/index.php?title=PartitionKeyStatistics_(Diagnostic_Log)&amp;diff=6231"/>
		<updated>2026-10-26T15:07:39Z</updated>

		<summary type="html">&lt;p&gt;Anko: Recreated DP-420 term page: PartitionKeyStatistics (Diagnostic Log) (Maintenance &amp;amp; Security)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;amp;larr; Back to [[DP-420: Azure Cosmos DB Developer Specialty|DP-420 Terminology Reference]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Category:&#039;&#039;&#039; Maintenance &amp;amp; Security&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Summary:&#039;&#039;&#039; Estimated storage size (KB) per logical partition key; flags storage skew.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
PartitionKeyStatistics is a diagnostic log table that logs logical partition key statistics in estimated KB, showing the approximate storage size consumed by each partition key value. It is the primary tool for troubleshooting storage skew — where one or a few partition key values approach the 20 GB logical partition storage limit while others remain nearly empty.&lt;br /&gt;
&lt;br /&gt;
== More Info &amp;amp; Links ==&lt;br /&gt;
* [https://learn.microsoft.com/en-us/azure/cosmos-db/monitor-resource-logs Microsoft Learn: Monitor and troubleshoot using diagnostic logs]&lt;br /&gt;
&lt;br /&gt;
== DP-420 Style Practice Questions ==&lt;br /&gt;
&#039;&#039;&#039;Q1.&#039;&#039;&#039; What does the PartitionKeyStatistics diagnostic log table report?&lt;br /&gt;
* A. Estimated storage size (in KB) consumed by each logical partition key value&lt;br /&gt;
* B. Per-second RU/s consumption per partition key&lt;br /&gt;
* C. The account&#039;s consistency level history&lt;br /&gt;
* D. The list of regions enabled for multi-region writes&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q2.&#039;&#039;&#039; What problem is PartitionKeyStatistics most useful for troubleshooting?&lt;br /&gt;
* A. Storage skew, where some partition key values approach the logical partition storage limit&lt;br /&gt;
* B. Query RU cost estimation&lt;br /&gt;
* C. Change feed processor lag&lt;br /&gt;
* D. 429 throttling error rates&lt;br /&gt;
&lt;br /&gt;
== Answer Key ==&lt;br /&gt;
&#039;&#039;Answers are listed at the very end so you can attempt the questions first.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Q1 (PartitionKeyStatistics (Diagnostic Log)):&#039;&#039;&#039; A. Estimated storage size (in KB) consumed by each logical partition key value — PartitionKeyStatistics reports estimated storage size per partition key, in KB.&lt;br /&gt;
* &#039;&#039;&#039;Q2 (PartitionKeyStatistics (Diagnostic Log)):&#039;&#039;&#039; A. Storage skew, where some partition key values approach the logical partition storage limit — This table helps identify storage skew by showing which partition key values are approaching the 20 GB logical partition limit.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;DP-420: Designing and Implementing Cloud-Native Applications Using Microsoft Azure Cosmos DB — term detail page&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[Category:DP-420 Terminology]]&lt;br /&gt;
[[Category:Maintenance &amp;amp; Security]]&lt;/div&gt;</summary>
		<author><name>Anko</name></author>
	</entry>
	<entry>
		<id>https://ilianko.com/index.php?title=PartitionKeyRUConsumption_(Diagnostic_Log)&amp;diff=6230</id>
		<title>PartitionKeyRUConsumption (Diagnostic Log)</title>
		<link rel="alternate" type="text/html" href="https://ilianko.com/index.php?title=PartitionKeyRUConsumption_(Diagnostic_Log)&amp;diff=6230"/>
		<updated>2026-10-26T15:07:39Z</updated>

		<summary type="html">&lt;p&gt;Anko: Recreated DP-420 term page: PartitionKeyRUConsumption (Diagnostic Log) (Maintenance &amp;amp; Security)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;amp;larr; Back to [[DP-420: Azure Cosmos DB Developer Specialty|DP-420 Terminology Reference]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Category:&#039;&#039;&#039; Maintenance &amp;amp; Security&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Summary:&#039;&#039;&#039; Per-second RU/s consumption per partition key; pinpoints hot partitions.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
PartitionKeyRUConsumption is a diagnostic log table (available through Azure Monitor resource-specific diagnostic logs) that logs every second&#039;s aggregated RU/s consumption per partition key. It is the go-to table for troubleshooting hot partitions, letting you pinpoint exactly which partition key values are consuming a disproportionate share of throughput, which the higher-level Normalized RU Consumption metric can only show at the partition level.&lt;br /&gt;
&lt;br /&gt;
== More Info &amp;amp; Links ==&lt;br /&gt;
* [https://learn.microsoft.com/en-us/azure/cosmos-db/monitor-resource-logs Microsoft Learn: Monitor and troubleshoot using diagnostic logs]&lt;br /&gt;
&lt;br /&gt;
== DP-420 Style Practice Questions ==&lt;br /&gt;
&#039;&#039;&#039;Q1.&#039;&#039;&#039; What does the PartitionKeyRUConsumption diagnostic log table record?&lt;br /&gt;
* A. Per-second aggregated RU/s consumption for each partition key&lt;br /&gt;
* B. The total storage size of each logical partition&lt;br /&gt;
* C. The list of composite indexes defined on a container&lt;br /&gt;
* D. Control-plane operations such as adding a region&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q2.&#039;&#039;&#039; Which troubleshooting scenario is PartitionKeyRUConsumption best suited for?&lt;br /&gt;
* A. Identifying a hot partition by pinpointing which partition key values consume disproportionate RUs&lt;br /&gt;
* B. Identifying skewed logical partition storage size&lt;br /&gt;
* C. Auditing control-plane changes like region additions&lt;br /&gt;
* D. Estimating change feed processing lag&lt;br /&gt;
&lt;br /&gt;
== Answer Key ==&lt;br /&gt;
&#039;&#039;Answers are listed at the very end so you can attempt the questions first.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Q1 (PartitionKeyRUConsumption (Diagnostic Log)):&#039;&#039;&#039; A. Per-second aggregated RU/s consumption for each partition key — PartitionKeyRUConsumption logs per-second RU/s consumption aggregated by partition key value.&lt;br /&gt;
* &#039;&#039;&#039;Q2 (PartitionKeyRUConsumption (Diagnostic Log)):&#039;&#039;&#039; A. Identifying a hot partition by pinpointing which partition key values consume disproportionate RUs — This table is specifically designed to help diagnose hot partitions by exposing per-partition-key RU consumption over time.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;DP-420: Designing and Implementing Cloud-Native Applications Using Microsoft Azure Cosmos DB — term detail page&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[Category:DP-420 Terminology]]&lt;br /&gt;
[[Category:Maintenance &amp;amp; Security]]&lt;/div&gt;</summary>
		<author><name>Anko</name></author>
	</entry>
	<entry>
		<id>https://ilianko.com/index.php?title=Normalized_RU_Consumption&amp;diff=6229</id>
		<title>Normalized RU Consumption</title>
		<link rel="alternate" type="text/html" href="https://ilianko.com/index.php?title=Normalized_RU_Consumption&amp;diff=6229"/>
		<updated>2026-10-26T15:07:38Z</updated>

		<summary type="html">&lt;p&gt;Anko: Recreated DP-420 term page: Normalized RU Consumption (Maintenance &amp;amp; Security)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;amp;larr; Back to [[DP-420: Azure Cosmos DB Developer Specialty|DP-420 Terminology Reference]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Category:&#039;&#039;&#039; Maintenance &amp;amp; Security&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Summary:&#039;&#039;&#039; Azure Monitor metric showing % of provisioned throughput used; flags hot partitions.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
Normalized RU Consumption is an Azure Monitor metric that reports the percentage of provisioned throughput being utilized by a container or partition over a given period, helping identify hot partitions (nearing 100%) or under-provisioned/over-provisioned throughput, without needing to manually calculate raw RU usage against the provisioned amount.&lt;br /&gt;
&lt;br /&gt;
== More Info &amp;amp; Links ==&lt;br /&gt;
* [https://learn.microsoft.com/en-us/azure/cosmos-db/monitor-normalized-request-units Microsoft Learn: Monitor Normalized RU Consumption]&lt;br /&gt;
&lt;br /&gt;
== DP-420 Style Practice Questions ==&lt;br /&gt;
&#039;&#039;&#039;Q1.&#039;&#039;&#039; What does the Normalized RU Consumption metric represent?&lt;br /&gt;
* A. The percentage of provisioned throughput being consumed by a container or partition&lt;br /&gt;
* B. The total number of documents stored&lt;br /&gt;
* C. The number of regions data is replicated to&lt;br /&gt;
* D. The number of indexed properties&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q2.&#039;&#039;&#039; A partition consistently showing Normalized RU Consumption near 100% likely indicates what?&lt;br /&gt;
* A. A hot partition that may be throttling requests and could benefit from better partition key distribution&lt;br /&gt;
* B. The partition key is optimally distributed&lt;br /&gt;
* C. TTL needs to be enabled&lt;br /&gt;
* D. The consistency level should be lowered&lt;br /&gt;
&lt;br /&gt;
== Answer Key ==&lt;br /&gt;
&#039;&#039;Answers are listed at the very end so you can attempt the questions first.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Q1 (Normalized RU Consumption):&#039;&#039;&#039; A. The percentage of provisioned throughput being consumed by a container or partition — Normalized RU Consumption shows RU usage as a percentage of the provisioned throughput, making hot partitions easy to spot.&lt;br /&gt;
* &#039;&#039;&#039;Q2 (Normalized RU Consumption):&#039;&#039;&#039; A. A hot partition that may be throttling requests and could benefit from better partition key distribution — Consistently high normalized RU consumption on a partition signals a hot partition at risk of throttling (429s).&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;DP-420: Designing and Implementing Cloud-Native Applications Using Microsoft Azure Cosmos DB — term detail page&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[Category:DP-420 Terminology]]&lt;br /&gt;
[[Category:Maintenance &amp;amp; Security]]&lt;/div&gt;</summary>
		<author><name>Anko</name></author>
	</entry>
	<entry>
		<id>https://ilianko.com/index.php?title=Alerts&amp;diff=6228</id>
		<title>Alerts</title>
		<link rel="alternate" type="text/html" href="https://ilianko.com/index.php?title=Alerts&amp;diff=6228"/>
		<updated>2026-10-26T15:07:38Z</updated>

		<summary type="html">&lt;p&gt;Anko: Recreated DP-420 term page: Alerts (Maintenance &amp;amp; Security)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;amp;larr; Back to [[DP-420: Azure Cosmos DB Developer Specialty|DP-420 Terminology Reference]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Category:&#039;&#039;&#039; Maintenance &amp;amp; Security&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Summary:&#039;&#039;&#039; Cosmo DB alerts&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&#039;&#039;[Image: dataUsageAlert.png (Alerts)]&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Split by dimension: Use dimensions to monitor specific time series and provide context to the fired alert.&lt;br /&gt;
* Aggregate type: There are five basic aggregation types available in the metrics explorer (Sum, Count, Average, Min, and Max).&lt;br /&gt;
* Threshold: This is used to evaluate an alert firming condition rule and can either be Static and Dynamic.&lt;br /&gt;
* Unit: This specifies the threshold unit.&lt;br /&gt;
&lt;br /&gt;
== More Info &amp;amp; Links ==&lt;br /&gt;
* [https://learn.microsoft.com/en-us/azure/cosmos-db/nosql/conceptual-resilient-sdk-applications Microsoft Learn: Handling rate limiting / request rate too large]&lt;br /&gt;
&lt;br /&gt;
== DP-420 Style Practice Questions ==&lt;br /&gt;
&#039;&#039;&#039;Q1.&#039;&#039;&#039; What does a 429 error from Azure Cosmos DB typically indicate?&lt;br /&gt;
* A. The request was throttled because provisioned throughput (RU/s) was exceeded&lt;br /&gt;
* B. The requested item does not exist&lt;br /&gt;
* C. An authentication failure occurred&lt;br /&gt;
* D. A conflict occurred during multi-region writes&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q2.&#039;&#039;&#039; Which of these could help reduce the frequency of 429 errors?&lt;br /&gt;
* A. Improving partition key distribution to avoid hot partitions, or increasing provisioned RU/s&lt;br /&gt;
* B. Disabling the SDK&#039;s automatic retry policy&lt;br /&gt;
* C. Switching to gateway mode exclusively&lt;br /&gt;
* D. Reducing the number of properties indexed&lt;br /&gt;
&lt;br /&gt;
== Answer Key ==&lt;br /&gt;
&#039;&#039;Answers are listed at the very end so you can attempt the questions first.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Q1 (429 Throttling Error):&#039;&#039;&#039; A. The request was throttled because provisioned throughput (RU/s) was exceeded — A 429 status code means the request rate exceeded the provisioned RU/s, triggering throttling.&lt;br /&gt;
* &#039;&#039;&#039;Q2 (429 Throttling Error):&#039;&#039;&#039; A. Improving partition key distribution to avoid hot partitions, or increasing provisioned RU/s — Better partition key distribution and/or higher provisioned throughput both help reduce 429 throttling errors.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;DP-420: Designing and Implementing Cloud-Native Applications Using Microsoft Azure Cosmos DB — term detail page&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[Category:DP-420 Terminology]]&lt;br /&gt;
[[Category:Maintenance &amp;amp; Security]]&lt;/div&gt;</summary>
		<author><name>Anko</name></author>
	</entry>
	<entry>
		<id>https://ilianko.com/index.php?title=Change_Feed_Estimator&amp;diff=6227</id>
		<title>Change Feed Estimator</title>
		<link rel="alternate" type="text/html" href="https://ilianko.com/index.php?title=Change_Feed_Estimator&amp;diff=6227"/>
		<updated>2026-10-26T15:07:38Z</updated>

		<summary type="html">&lt;p&gt;Anko: Recreated DP-420 term page: Change Feed Estimator (Optimization)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;amp;larr; Back to [[DP-420: Azure Cosmos DB Developer Specialty|DP-420 Terminology Reference]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Category:&#039;&#039;&#039; Optimization&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Summary:&#039;&#039;&#039; Reports pending change feed lag to help decide when to scale out consumer instances.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
The change feed estimator is a tool provided by the Azure Cosmos DB SDK&#039;s change feed processor that reports how many changes are pending to be processed (the &#039;lag&#039;) by change feed consumers, helping you determine whether you need to scale out the number of change feed processor instances to keep up with the rate of incoming changes.&lt;br /&gt;
&lt;br /&gt;
== More Info &amp;amp; Links ==&lt;br /&gt;
* [https://learn.microsoft.com/en-us/azure/cosmos-db/nosql/how-to-use-change-feed-estimator Microsoft Learn: Change feed estimator]&lt;br /&gt;
&lt;br /&gt;
== DP-420 Style Practice Questions ==&lt;br /&gt;
&#039;&#039;&#039;Q1.&#039;&#039;&#039; What does the change feed estimator help you determine?&lt;br /&gt;
* A. How many unprocessed changes (&#039;lag&#039;) remain, to decide if you should scale out consumer instances&lt;br /&gt;
* B. The RU cost of a specific query&lt;br /&gt;
* C. The consistency level of the account&lt;br /&gt;
* D. The maximum logical partition size&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q2.&#039;&#039;&#039; What might a growing lag reported by the change feed estimator indicate?&lt;br /&gt;
* A. Consumers are falling behind and may need additional change feed processor instances&lt;br /&gt;
* B. The container&#039;s indexing policy is misconfigured&lt;br /&gt;
* C. The partition key needs to be changed&lt;br /&gt;
* D. TTL is about to expire on many items&lt;br /&gt;
&lt;br /&gt;
== Answer Key ==&lt;br /&gt;
&#039;&#039;Answers are listed at the very end so you can attempt the questions first.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Q1 (Change Feed Estimator):&#039;&#039;&#039; A. How many unprocessed changes (&#039;lag&#039;) remain, to decide if you should scale out consumer instances — The change feed estimator reports the backlog of unprocessed changes, guiding scale-out decisions for consumers.&lt;br /&gt;
* &#039;&#039;&#039;Q2 (Change Feed Estimator):&#039;&#039;&#039; A. Consumers are falling behind and may need additional change feed processor instances — A growing lag suggests the current number of change feed processor instances is insufficient to keep pace with incoming changes.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;DP-420: Designing and Implementing Cloud-Native Applications Using Microsoft Azure Cosmos DB — term detail page&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[Category:DP-420 Terminology]]&lt;br /&gt;
[[Category:Optimization]]&lt;/div&gt;</summary>
		<author><name>Anko</name></author>
	</entry>
	<entry>
		<id>https://ilianko.com/index.php?title=Integrated_Cache&amp;diff=6226</id>
		<title>Integrated Cache</title>
		<link rel="alternate" type="text/html" href="https://ilianko.com/index.php?title=Integrated_Cache&amp;diff=6226"/>
		<updated>2026-10-26T15:07:37Z</updated>

		<summary type="html">&lt;p&gt;Anko: Recreated DP-420 term page: Integrated Cache (Optimization)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;amp;larr; Back to [[DP-420: Azure Cosmos DB Developer Specialty|DP-420 Terminology Reference]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Category:&#039;&#039;&#039; Optimization&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Summary:&#039;&#039;&#039; In-memory caching layer (via dedicated gateway) reducing RU cost/latency for repeated reads.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
The Azure Cosmos DB integrated cache is an in-memory caching layer, provisioned via a dedicated gateway, that automatically caches the results of point reads and queries to reduce RU consumption and latency for repeated read operations, without requiring changes to application query logic.&lt;br /&gt;
&lt;br /&gt;
== More Info &amp;amp; Links ==&lt;br /&gt;
* [https://learn.microsoft.com/en-us/azure/cosmos-db/integrated-cache Microsoft Learn: Azure Cosmos DB integrated cache]&lt;br /&gt;
&lt;br /&gt;
== DP-420 Style Practice Questions ==&lt;br /&gt;
&#039;&#039;&#039;Q1.&#039;&#039;&#039; What is the main benefit of enabling the Azure Cosmos DB integrated cache?&lt;br /&gt;
* A. Reduced RU consumption and latency for repeated point reads and queries&lt;br /&gt;
* B. Automatic multi-region writes&lt;br /&gt;
* C. Stronger consistency guarantees than Strong consistency&lt;br /&gt;
* D. Elimination of the need for an indexing policy&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q2.&#039;&#039;&#039; What Azure Cosmos DB component is required to use the integrated cache?&lt;br /&gt;
* A. A dedicated gateway&lt;br /&gt;
* B. A stored procedure&lt;br /&gt;
* C. A synthetic partition key&lt;br /&gt;
* D. A composite index&lt;br /&gt;
&lt;br /&gt;
== Answer Key ==&lt;br /&gt;
&#039;&#039;Answers are listed at the very end so you can attempt the questions first.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Q1 (Integrated Cache):&#039;&#039;&#039; A. Reduced RU consumption and latency for repeated point reads and queries — The integrated cache reduces RU cost and latency by serving repeated reads/queries from an in-memory cache.&lt;br /&gt;
* &#039;&#039;&#039;Q2 (Integrated Cache):&#039;&#039;&#039; A. A dedicated gateway — The integrated cache is provisioned through a dedicated gateway deployment.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;DP-420: Designing and Implementing Cloud-Native Applications Using Microsoft Azure Cosmos DB — term detail page&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[Category:DP-420 Terminology]]&lt;br /&gt;
[[Category:Optimization]]&lt;/div&gt;</summary>
		<author><name>Anko</name></author>
	</entry>
	<entry>
		<id>https://ilianko.com/index.php?title=Wildcard_/_Included_%26_Excluded_Paths&amp;diff=6225</id>
		<title>Wildcard / Included &amp; Excluded Paths</title>
		<link rel="alternate" type="text/html" href="https://ilianko.com/index.php?title=Wildcard_/_Included_%26_Excluded_Paths&amp;diff=6225"/>
		<updated>2026-10-26T15:07:37Z</updated>

		<summary type="html">&lt;p&gt;Anko: Recreated DP-420 term page: Wildcard / Included &amp;amp; Excluded Paths (Optimization)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;amp;larr; Back to [[DP-420: Azure Cosmos DB Developer Specialty|DP-420 Terminology Reference]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Category:&#039;&#039;&#039; Optimization&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Summary:&#039;&#039;&#039; Path expressions (with optional /* wildcard) controlling exactly which properties are indexed.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
Indexing policies use included and excluded path expressions — optionally with a wildcard (/*) — to control precisely which properties (and nested properties) are indexed. A wildcard path like /properties/*/? indexes an entire subtree, while explicit exclusions (e.g., large or rarely-queried properties) reduce write RU cost and storage without a full custom rewrite of the policy for every property.&lt;br /&gt;
&lt;br /&gt;
== More Info &amp;amp; Links ==&lt;br /&gt;
* [https://learn.microsoft.com/en-us/azure/cosmos-db/index-policy Microsoft Learn: Indexing policies in Azure Cosmos DB]&lt;br /&gt;
&lt;br /&gt;
== DP-420 Style Practice Questions ==&lt;br /&gt;
&#039;&#039;&#039;Q1.&#039;&#039;&#039; What does a wildcard (/*) in an indexing policy path expression represent?&lt;br /&gt;
* A. The entire subtree of properties beneath that path&lt;br /&gt;
* B. Only the partition key property&lt;br /&gt;
* C. A single specific property, never nested ones&lt;br /&gt;
* D. A reference to a composite index&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q2.&#039;&#039;&#039; Why would you add a property to the excludedPaths of an indexing policy?&lt;br /&gt;
* A. To reduce write RU cost and storage by skipping indexing of that property&lt;br /&gt;
* B. To make the property queryable with ORDER BY&lt;br /&gt;
* C. To enable geospatial queries on that property&lt;br /&gt;
* D. To enforce a unique key constraint on that property&lt;br /&gt;
&lt;br /&gt;
== Answer Key ==&lt;br /&gt;
&#039;&#039;Answers are listed at the very end so you can attempt the questions first.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Q1 (Wildcard / Included &amp;amp; Excluded Paths):&#039;&#039;&#039; A. The entire subtree of properties beneath that path — A wildcard path expression like /path/* indexes every property in the subtree rooted at that path.&lt;br /&gt;
* &#039;&#039;&#039;Q2 (Wildcard / Included &amp;amp; Excluded Paths):&#039;&#039;&#039; A. To reduce write RU cost and storage by skipping indexing of that property — Excluding a path from indexing avoids the write overhead of maintaining an index for properties that aren&#039;t queried.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;DP-420: Designing and Implementing Cloud-Native Applications Using Microsoft Azure Cosmos DB — term detail page&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[Category:DP-420 Terminology]]&lt;br /&gt;
[[Category:Optimization]]&lt;/div&gt;</summary>
		<author><name>Anko</name></author>
	</entry>
	<entry>
		<id>https://ilianko.com/index.php?title=Vector_Index&amp;diff=6224</id>
		<title>Vector Index</title>
		<link rel="alternate" type="text/html" href="https://ilianko.com/index.php?title=Vector_Index&amp;diff=6224"/>
		<updated>2026-10-26T15:07:36Z</updated>

		<summary type="html">&lt;p&gt;Anko: Recreated DP-420 term page: Vector Index (Optimization)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;amp;larr; Back to [[DP-420: Azure Cosmos DB Developer Specialty|DP-420 Terminology Reference]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Category:&#039;&#039;&#039; Optimization&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Summary:&#039;&#039;&#039; Enables approximate nearest-neighbor similarity search over embeddings for AI/RAG scenarios.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
A vector index enables efficient approximate nearest-neighbor (ANN) similarity search over high-dimensional vector embeddings stored directly in Azure Cosmos DB items — powering AI scenarios such as retrieval-augmented generation (RAG) without needing a separate vector database. Azure Cosmos DB for NoSQL supports vector index types such as flat, quantizedFlat, and DiskANN, configured via a vector embedding policy alongside the container&#039;s indexing policy.&lt;br /&gt;
&lt;br /&gt;
== More Info &amp;amp; Links ==&lt;br /&gt;
* [https://learn.microsoft.com/en-us/azure/cosmos-db/nosql/vector-search Microsoft Learn: Vector search in Azure Cosmos DB for NoSQL]&lt;br /&gt;
&lt;br /&gt;
== DP-420 Style Practice Questions ==&lt;br /&gt;
&#039;&#039;&#039;Q1.&#039;&#039;&#039; What is the primary purpose of a vector index in Azure Cosmos DB?&lt;br /&gt;
* A. Efficient approximate nearest-neighbor similarity search over vector embeddings for AI/RAG scenarios&lt;br /&gt;
* B. Enforcing uniqueness of a property across a logical partition&lt;br /&gt;
* C. Sorting items by their partition key&lt;br /&gt;
* D. Accelerating geospatial distance calculations&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q2.&#039;&#039;&#039; Which of the following is a supported vector index type in Azure Cosmos DB for NoSQL?&lt;br /&gt;
* A. DiskANN&lt;br /&gt;
* B. Composite&lt;br /&gt;
* C. Wildcard&lt;br /&gt;
* D. Hash&lt;br /&gt;
&lt;br /&gt;
== Answer Key ==&lt;br /&gt;
&#039;&#039;Answers are listed at the very end so you can attempt the questions first.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Q1 (Vector Index):&#039;&#039;&#039; A. Efficient approximate nearest-neighbor similarity search over vector embeddings for AI/RAG scenarios — Vector indexes enable fast similarity search over embeddings, supporting AI workloads like retrieval-augmented generation.&lt;br /&gt;
* &#039;&#039;&#039;Q2 (Vector Index):&#039;&#039;&#039; A. DiskANN — Azure Cosmos DB for NoSQL supports vector index types including flat, quantizedFlat, and DiskANN.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;DP-420: Designing and Implementing Cloud-Native Applications Using Microsoft Azure Cosmos DB — term detail page&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[Category:DP-420 Terminology]]&lt;br /&gt;
[[Category:Optimization]]&lt;/div&gt;</summary>
		<author><name>Anko</name></author>
	</entry>
	<entry>
		<id>https://ilianko.com/index.php?title=Composite_Index&amp;diff=6223</id>
		<title>Composite Index</title>
		<link rel="alternate" type="text/html" href="https://ilianko.com/index.php?title=Composite_Index&amp;diff=6223"/>
		<updated>2026-10-26T15:07:36Z</updated>

		<summary type="html">&lt;p&gt;Anko: Recreated DP-420 term page: Composite Index (Optimization)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;amp;larr; Back to [[DP-420: Azure Cosmos DB Developer Specialty|DP-420 Terminology Reference]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Category:&#039;&#039;&#039; Optimization&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Summary:&#039;&#039;&#039; Index across multiple properties to support efficient multi-property filter/sort queries.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
A composite index is an index defined across multiple properties (in a specified order and sort direction) to efficiently support queries that filter or sort on more than one property at once — such as an ORDER BY across two properties, or equality/range filters combined with a sort. Without an appropriate composite index, such queries may require more RUs or fail to use the index efficiently.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;indexingMode&amp;quot;: &amp;quot;consistent&amp;quot;,&lt;br /&gt;
  &amp;quot;includedPaths&amp;quot;: [&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;path&amp;quot;: &amp;quot;/*&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
  ],&lt;br /&gt;
  &amp;quot;excludedPaths&amp;quot;: [&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;path&amp;quot;: &amp;quot;/_etag/?&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
  ],&lt;br /&gt;
  &amp;quot;compositeIndexes&amp;quot;: [&lt;br /&gt;
    [&lt;br /&gt;
      {&lt;br /&gt;
        &amp;quot;path&amp;quot;: &amp;quot;/category/?&amp;quot;,&lt;br /&gt;
        &amp;quot;order&amp;quot;: &amp;quot;ascending&amp;quot;&lt;br /&gt;
      },&lt;br /&gt;
      {&lt;br /&gt;
        &amp;quot;path&amp;quot;: &amp;quot;/timestamp/?&amp;quot;,&lt;br /&gt;
        &amp;quot;order&amp;quot;: &amp;quot;descending&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
    ]&lt;br /&gt;
  ]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== More Info &amp;amp; Links ==&lt;br /&gt;
* [https://learn.microsoft.com/en-us/azure/cosmos-db/index-policy#composite-indexes Microsoft Learn: Composite indexes]&lt;br /&gt;
&lt;br /&gt;
== DP-420 Style Practice Questions ==&lt;br /&gt;
&#039;&#039;&#039;Q1.&#039;&#039;&#039; When is a composite index particularly useful in Azure Cosmos DB?&lt;br /&gt;
* A. When a query filters or sorts (ORDER BY) on multiple properties simultaneously&lt;br /&gt;
* B. When a container has only one property in every document&lt;br /&gt;
* C. When TTL is enabled&lt;br /&gt;
* D. When using only point operations&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q2.&#039;&#039;&#039; What must be specified when defining a composite index?&lt;br /&gt;
* A. The set of properties and their sort order (ascending/descending)&lt;br /&gt;
* B. Only the partition key&lt;br /&gt;
* C. The container&#039;s throughput mode&lt;br /&gt;
* D. The consistency level&lt;br /&gt;
&lt;br /&gt;
== Answer Key ==&lt;br /&gt;
&#039;&#039;Answers are listed at the very end so you can attempt the questions first.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Q1 (Composite Index):&#039;&#039;&#039; A. When a query filters or sorts (ORDER BY) on multiple properties simultaneously — Composite indexes optimize queries that need efficient filtering or ordering across multiple properties at once.&lt;br /&gt;
* &#039;&#039;&#039;Q2 (Composite Index):&#039;&#039;&#039; A. The set of properties and their sort order (ascending/descending) — A composite index definition specifies the ordered list of properties along with ascending/descending sort order for each.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;DP-420: Designing and Implementing Cloud-Native Applications Using Microsoft Azure Cosmos DB — term detail page&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[Category:DP-420 Terminology]]&lt;br /&gt;
[[Category:Optimization]]&lt;/div&gt;</summary>
		<author><name>Anko</name></author>
	</entry>
	<entry>
		<id>https://ilianko.com/index.php?title=Spatial_Index&amp;diff=6222</id>
		<title>Spatial Index</title>
		<link rel="alternate" type="text/html" href="https://ilianko.com/index.php?title=Spatial_Index&amp;diff=6222"/>
		<updated>2026-10-26T15:07:36Z</updated>

		<summary type="html">&lt;p&gt;Anko: Recreated DP-420 term page: Spatial Index (Optimization)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;amp;larr; Back to [[DP-420: Azure Cosmos DB Developer Specialty|DP-420 Terminology Reference]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Category:&#039;&#039;&#039; Optimization&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Summary:&#039;&#039;&#039; Accelerates geospatial queries (ST_DISTANCE, ST_WITHIN) over GeoJSON properties.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
A spatial index supports efficient execution of geospatial queries — such as ST_DISTANCE, ST_WITHIN, and ST_INTERSECTS — over properties containing GeoJSON data (e.g., Point, Polygon, LineString). Spatial indexes are applied automatically to properties recognized as GeoJSON when using the default indexing policy, enabling location-based queries like &#039;find all items within X kilometers of a point&#039;.&lt;br /&gt;
&lt;br /&gt;
== More Info &amp;amp; Links ==&lt;br /&gt;
* [https://learn.microsoft.com/en-us/azure/cosmos-db/nosql/query/geospatial-query Microsoft Learn: Query geospatial data]&lt;br /&gt;
&lt;br /&gt;
== DP-420 Style Practice Questions ==&lt;br /&gt;
&#039;&#039;&#039;Q1.&#039;&#039;&#039; What kind of queries does a spatial index accelerate in Azure Cosmos DB?&lt;br /&gt;
* A. Geospatial queries such as proximity (ST_DISTANCE) and containment (ST_WITHIN) over GeoJSON data&lt;br /&gt;
* B. Full-text search queries&lt;br /&gt;
* C. Vector similarity search queries&lt;br /&gt;
* D. Aggregate queries such as COUNT and SUM&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q2.&#039;&#039;&#039; What data format must a property use to benefit from a spatial index?&lt;br /&gt;
* A. GeoJSON (e.g., Point, Polygon, LineString)&lt;br /&gt;
* B. XML&lt;br /&gt;
* C. A composite of two numeric properties&lt;br /&gt;
* D. A base64-encoded binary blob&lt;br /&gt;
&lt;br /&gt;
== Answer Key ==&lt;br /&gt;
&#039;&#039;Answers are listed at the very end so you can attempt the questions first.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Q1 (Spatial Index):&#039;&#039;&#039; A. Geospatial queries such as proximity (ST_DISTANCE) and containment (ST_WITHIN) over GeoJSON data — Spatial indexes accelerate geospatial functions like ST_DISTANCE, ST_WITHIN, and ST_INTERSECTS over GeoJSON properties.&lt;br /&gt;
* &#039;&#039;&#039;Q2 (Spatial Index):&#039;&#039;&#039; A. GeoJSON (e.g., Point, Polygon, LineString) — Spatial indexes apply to properties containing valid GeoJSON data types such as Point, Polygon, and LineString.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;DP-420: Designing and Implementing Cloud-Native Applications Using Microsoft Azure Cosmos DB — term detail page&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[Category:DP-420 Terminology]]&lt;br /&gt;
[[Category:Optimization]]&lt;/div&gt;</summary>
		<author><name>Anko</name></author>
	</entry>
	<entry>
		<id>https://ilianko.com/index.php?title=Range_Index&amp;diff=6221</id>
		<title>Range Index</title>
		<link rel="alternate" type="text/html" href="https://ilianko.com/index.php?title=Range_Index&amp;diff=6221"/>
		<updated>2026-10-26T15:07:35Z</updated>

		<summary type="html">&lt;p&gt;Anko: Recreated DP-420 term page: Range Index (Optimization)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;amp;larr; Back to [[DP-420: Azure Cosmos DB Developer Specialty|DP-420 Terminology Reference]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Category:&#039;&#039;&#039; Optimization&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Summary:&#039;&#039;&#039; Default index type for string/numeric properties; supports equality, range, and ORDER BY.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
A range index is the default index type Azure Cosmos DB applies to string and numeric properties, storing values in a sorted (B-tree-like) structure that efficiently supports equality (=), range (&amp;gt;, &amp;lt;,&amp;gt;=, &amp;lt;=), ORDER BY, and JOIN queries on that property. Because the default indexing policy indexes every property with a range index automatically, most queries work efficiently out of the box without any manual index tuning.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//old way of authenticating&lt;br /&gt;
//new CosmosClient(endpoint, accountKey)&lt;br /&gt;
//new way of authenticating&lt;br /&gt;
-&amp;amp;gt; new CosmosClient(endpoint, new DefaultAzureCredential());&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== More Info &amp;amp; Links ==&lt;br /&gt;
* [https://learn.microsoft.com/en-us/azure/cosmos-db/index-policy Microsoft Learn: Indexing policies in Azure Cosmos DB]&lt;br /&gt;
&lt;br /&gt;
== DP-420 Style Practice Questions ==&lt;br /&gt;
&#039;&#039;&#039;Q1.&#039;&#039;&#039; What is the default index type applied to string and numeric properties in Azure Cosmos DB?&lt;br /&gt;
* A. Range index&lt;br /&gt;
* B. Spatial index&lt;br /&gt;
* C. Composite index&lt;br /&gt;
* D. Hash index&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q2.&#039;&#039;&#039; Which query types does a range index efficiently support?&lt;br /&gt;
* A. Equality, range comparisons, and ORDER BY on the indexed property&lt;br /&gt;
* B. Only geospatial proximity searches&lt;br /&gt;
* C. Only vector similarity searches&lt;br /&gt;
* D. Only queries against the partition key&lt;br /&gt;
&lt;br /&gt;
== Answer Key ==&lt;br /&gt;
&#039;&#039;Answers are listed at the very end so you can attempt the questions first.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Q1 (Range Index):&#039;&#039;&#039; A. Range index — Range indexes are applied by default to string and numeric properties and support equality, range, and ORDER BY queries.&lt;br /&gt;
* &#039;&#039;&#039;Q2 (Range Index):&#039;&#039;&#039; A. Equality, range comparisons, and ORDER BY on the indexed property — A range index supports equality, range (&amp;gt;, &amp;lt;,&amp;gt;=, &amp;lt;=), ORDER BY, and JOIN operations on the indexed property.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;DP-420: Designing and Implementing Cloud-Native Applications Using Microsoft Azure Cosmos DB — term detail page&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[Category:DP-420 Terminology]]&lt;br /&gt;
[[Category:Optimization]]&lt;/div&gt;</summary>
		<author><name>Anko</name></author>
	</entry>
	<entry>
		<id>https://ilianko.com/index.php?title=Indexing_Policy&amp;diff=6220</id>
		<title>Indexing Policy</title>
		<link rel="alternate" type="text/html" href="https://ilianko.com/index.php?title=Indexing_Policy&amp;diff=6220"/>
		<updated>2026-10-26T15:07:35Z</updated>

		<summary type="html">&lt;p&gt;Anko: Recreated DP-420 term page: Indexing Policy (Optimization)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;amp;larr; Back to [[DP-420: Azure Cosmos DB Developer Specialty|DP-420 Terminology Reference]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Category:&#039;&#039;&#039; Optimization&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Summary:&#039;&#039;&#039; Defines which properties are indexed, trading off query performance vs. write RU cost.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
An indexing policy defines which properties of items in a container are indexed and how, controlling the trade-off between query performance (read efficiency) and write RU cost/storage (since more indexed paths mean more write overhead). By default, Azure Cosmos DB automatically indexes every property, but you can customize the policy to include/exclude specific paths, favoring either a read-heavy or write-heavy workload.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;indexingMode&amp;quot;: &amp;quot;consistent&amp;quot;,&lt;br /&gt;
  &amp;quot;automatic&amp;quot;: true,&lt;br /&gt;
  &amp;quot;includedPaths&amp;quot;: [&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;path&amp;quot;: &amp;quot;/*&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
  ],&lt;br /&gt;
  &amp;quot;excludedPaths&amp;quot;: [&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;path&amp;quot;: &amp;quot;/\&amp;quot;_etag\&amp;quot;/?&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
  ]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
var containerDefinition = new ContainerDefinition&lt;br /&gt;
{&lt;br /&gt;
    Id = &amp;quot;Products&amp;quot;,&lt;br /&gt;
    PartitionKeyPath = &amp;quot;/category&amp;quot;,&lt;br /&gt;
    IndexingPolicy = new IndexingPolicy&lt;br /&gt;
    {&lt;br /&gt;
        Automatic = true,&lt;br /&gt;
        IndexingMode = IndexingMode.Consistent,&lt;br /&gt;
        IncludedPaths = &lt;br /&gt;
        {&lt;br /&gt;
            new IncludedPath { Path = &amp;quot;/*&amp;quot; } // Optional when automatic is true&lt;br /&gt;
        },&lt;br /&gt;
        ExcludedPaths =&lt;br /&gt;
        {&lt;br /&gt;
            new ExcludedPath { Path = &amp;quot;/description/*&amp;quot; } // Exclude description&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  string sqlQueryText = &amp;quot;SELECT TOP 10 c.id FROM c WHERE c.Item = &#039;value1234&#039; AND c.Price &amp;amp;gt; 2&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
    QueryDefinition query = new QueryDefinition(sqlQueryText);&lt;br /&gt;
&lt;br /&gt;
    FeedIterator resultSetIterator = container.GetItemQueryIterator(&lt;br /&gt;
                query, requestOptions: new QueryRequestOptions&lt;br /&gt;
        {&lt;br /&gt;
            PopulateIndexMetrics = true&lt;br /&gt;
        });&lt;br /&gt;
&lt;br /&gt;
    FeedResponse response = null;&lt;br /&gt;
&lt;br /&gt;
    while (resultSetIterator.HasMoreResults)&lt;br /&gt;
        {&lt;br /&gt;
          response = await resultSetIterator.ReadNextAsync();&lt;br /&gt;
          Console.WriteLine(response.IndexMetrics);&lt;br /&gt;
        }&lt;br /&gt;
  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== More Info &amp;amp; Links ==&lt;br /&gt;
* [https://learn.microsoft.com/en-us/azure/cosmos-db/index-policy Microsoft Learn: Indexing policies in Azure Cosmos DB]&lt;br /&gt;
&lt;br /&gt;
== DP-420 Style Practice Questions ==&lt;br /&gt;
&#039;&#039;&#039;Q1.&#039;&#039;&#039; What is indexed by default in a new Azure Cosmos DB for NoSQL container?&lt;br /&gt;
* A. Every property of every item, using the default automatic indexing policy&lt;br /&gt;
* B. No properties, until explicitly configured&lt;br /&gt;
* C. Only the partition key property&lt;br /&gt;
* D. Only properties marked as unique keys&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q2.&#039;&#039;&#039; Why might you exclude certain paths from indexing in a write-heavy workload?&lt;br /&gt;
* A. To reduce the RU cost and latency of write operations by avoiding unnecessary index maintenance&lt;br /&gt;
* B. To increase the maximum logical partition size&lt;br /&gt;
* C. To enable multi-region writes&lt;br /&gt;
* D. To allow TTL to be configured&lt;br /&gt;
&lt;br /&gt;
== Answer Key ==&lt;br /&gt;
&#039;&#039;Answers are listed at the very end so you can attempt the questions first.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Q1 (Indexing Policy):&#039;&#039;&#039; A. Every property of every item, using the default automatic indexing policy — By default, Azure Cosmos DB automatically indexes all properties unless a custom indexing policy excludes some paths.&lt;br /&gt;
* &#039;&#039;&#039;Q2 (Indexing Policy):&#039;&#039;&#039; A. To reduce the RU cost and latency of write operations by avoiding unnecessary index maintenance — Excluding unused paths from indexing reduces the RU cost of writes, which is valuable for write-heavy workloads.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;DP-420: Designing and Implementing Cloud-Native Applications Using Microsoft Azure Cosmos DB — term detail page&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[Category:DP-420 Terminology]]&lt;br /&gt;
[[Category:Optimization]]&lt;/div&gt;</summary>
		<author><name>Anko</name></author>
	</entry>
	<entry>
		<id>https://ilianko.com/index.php?title=Azure_AI_Search_Integration&amp;diff=6219</id>
		<title>Azure AI Search Integration</title>
		<link rel="alternate" type="text/html" href="https://ilianko.com/index.php?title=Azure_AI_Search_Integration&amp;diff=6219"/>
		<updated>2026-10-26T15:07:35Z</updated>

		<summary type="html">&lt;p&gt;Anko: Recreated DP-420 term page: Azure AI Search Integration (Integration &amp;amp; Analytics)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;amp;larr; Back to [[DP-420: Azure Cosmos DB Developer Specialty|DP-420 Terminology Reference]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Category:&#039;&#039;&#039; Integration &amp;amp; Analytics&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Summary:&#039;&#039;&#039; Indexer pulls Cosmos DB data (via change feed) to enable full-text/semantic search.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
Azure Cosmos DB integrates with Azure AI Search to enable full-text and semantic search over Cosmos DB data by configuring an Azure AI Search indexer that pulls data from a Cosmos DB container (often via the change feed for incremental indexing), so applications can perform rich search queries beyond what Cosmos DB&#039;s native query capabilities provide.&lt;br /&gt;
&lt;br /&gt;
== More Info &amp;amp; Links ==&lt;br /&gt;
* [https://learn.microsoft.com/en-us/azure/search/search-howto-index-cosmosdb Microsoft Learn: Index data from Azure Cosmos DB with Azure AI Search]&lt;br /&gt;
&lt;br /&gt;
== DP-420 Style Practice Questions ==&lt;br /&gt;
&#039;&#039;&#039;Q1.&#039;&#039;&#039; Why would you integrate Azure Cosmos DB with Azure AI Search?&lt;br /&gt;
* A. To enable rich full-text/semantic search capabilities over Cosmos DB data beyond native query features&lt;br /&gt;
* B. To enable multi-region writes&lt;br /&gt;
* C. To reduce RU consumption on point operations&lt;br /&gt;
* D. To enforce unique key constraints&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q2.&#039;&#039;&#039; How does an Azure AI Search indexer typically stay up to date with changes in a Cosmos DB container?&lt;br /&gt;
* A. By leveraging the change feed for incremental indexing&lt;br /&gt;
* B. By performing a full container scan on every search query&lt;br /&gt;
* C. By requiring manual re-indexing after every write&lt;br /&gt;
* D. By using a stored procedure triggered per search request&lt;br /&gt;
&lt;br /&gt;
== Answer Key ==&lt;br /&gt;
&#039;&#039;Answers are listed at the very end so you can attempt the questions first.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Q1 (Azure AI Search Integration):&#039;&#039;&#039; A. To enable rich full-text/semantic search capabilities over Cosmos DB data beyond native query features — Azure AI Search adds full-text and semantic search capabilities over data stored in Azure Cosmos DB.&lt;br /&gt;
* &#039;&#039;&#039;Q2 (Azure AI Search Integration):&#039;&#039;&#039; A. By leveraging the change feed for incremental indexing — Azure AI Search indexers can use the change feed to efficiently and incrementally pick up new/updated items.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;DP-420: Designing and Implementing Cloud-Native Applications Using Microsoft Azure Cosmos DB — term detail page&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[Category:DP-420 Terminology]]&lt;br /&gt;
[[Category:Integration &amp;amp; Analytics]]&lt;/div&gt;</summary>
		<author><name>Anko</name></author>
	</entry>
	<entry>
		<id>https://ilianko.com/index.php?title=Azure_Logic_Apps&amp;diff=6218</id>
		<title>Azure Logic Apps</title>
		<link rel="alternate" type="text/html" href="https://ilianko.com/index.php?title=Azure_Logic_Apps&amp;diff=6218"/>
		<updated>2026-10-26T15:07:34Z</updated>

		<summary type="html">&lt;p&gt;Anko: Recreated DP-420 term page: Azure Logic Apps (Integration &amp;amp; Analytics)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;amp;larr; Back to [[DP-420: Azure Cosmos DB Developer Specialty|DP-420 Terminology Reference]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Category:&#039;&#039;&#039; Integration &amp;amp; Analytics&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Summary:&#039;&#039;&#039; Low-code cloud workflow automation service integrating with Cosmos DB via connectors, triggers, and actions.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
Azure Logic Apps is a cloud-based serverless workflow and orchestration service that enables building automated, low-code/no-code business processes and enterprise integrations. With the Azure Cosmos DB connector, Logic Apps provides managed triggers (such as &#039;When an item is created or modified (V2)&#039;, powered by the Cosmos DB change feed) and numerous actions (including create or update document, read document, query documents with SQL, and delete document). In the DP-420 exam, Logic Apps is contrasted with Azure Functions: choose Logic Apps for visual, declarative orchestration connecting Cosmos DB to SaaS platforms, Office 365, or multi-step enterprise workflows without writing custom code; choose Azure Functions when complex code transformations, high-throughput microservices, or custom business logic are required.&lt;br /&gt;
&lt;br /&gt;
Example (Logic Apps Workflow Definition): Change Feed Trigger with Automated Action&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;quot;triggers&amp;quot;: {&lt;br /&gt;
  &amp;quot;When_items_are_created_or_modified&amp;quot;: {&lt;br /&gt;
    &amp;quot;type&amp;quot;: &amp;quot;ServiceProvider&amp;quot;,&lt;br /&gt;
    &amp;quot;inputs&amp;quot;: {&lt;br /&gt;
      &amp;quot;parameters&amp;quot;: {&lt;br /&gt;
        &amp;quot;databaseName&amp;quot;: &amp;quot;ecommerce&amp;quot;,&lt;br /&gt;
        &amp;quot;containerName&amp;quot;: &amp;quot;orders&amp;quot;&lt;br /&gt;
      },&lt;br /&gt;
      &amp;quot;serviceProviderConfiguration&amp;quot;: {&lt;br /&gt;
        &amp;quot;connectionName&amp;quot;: &amp;quot;serviceProviderConnections/azureCosmosDB&amp;quot;,&lt;br /&gt;
        &amp;quot;operationId&amp;quot;: &amp;quot;whenItemsAreCreatedOrModified&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
},&lt;br /&gt;
&amp;quot;actions&amp;quot;: {&lt;br /&gt;
  &amp;quot;Send_Email_Notification&amp;quot;: {&lt;br /&gt;
    &amp;quot;type&amp;quot;: &amp;quot;ApiConnection&amp;quot;,&lt;br /&gt;
    &amp;quot;inputs&amp;quot;: {&lt;br /&gt;
      &amp;quot;host&amp;quot;: { &amp;quot;connection&amp;quot;: { &amp;quot;referenceName&amp;quot;: &amp;quot;office365&amp;quot; } },&lt;br /&gt;
      &amp;quot;method&amp;quot;: &amp;quot;post&amp;quot;,&lt;br /&gt;
      &amp;quot;path&amp;quot;: &amp;quot;/v2/Mail&amp;quot;,&lt;br /&gt;
      &amp;quot;body&amp;quot;: {&lt;br /&gt;
        &amp;quot;To&amp;quot;: &amp;quot;ops@example.com&amp;quot;,&lt;br /&gt;
        &amp;quot;Subject&amp;quot;: &amp;quot;New High-Priority Order Received&amp;quot;,&lt;br /&gt;
        &amp;quot;Body&amp;quot;: &amp;quot;Order @{triggerBody()?[&#039;id&#039;]} was placed for customer @{triggerBody()?[&#039;customerId&#039;]}.&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This workflow automatically triggers when items change in the Cosmos DB &amp;lt;code&amp;gt;orders&amp;lt;/code&amp;gt; container and executes an Office 365 action to notify operations — achieving event-driven enterprise integration without maintaining custom server infrastructure or code.&lt;br /&gt;
&lt;br /&gt;
== More Info &amp;amp; Links ==&lt;br /&gt;
* [https://learn.microsoft.com/en-us/azure/connectors/connectors-create-api-cosmos-db Microsoft Learn: Connect to Azure Cosmos DB from workflows in Azure Logic Apps]&lt;br /&gt;
* [https://learn.microsoft.com/en-us/azure/logic-apps/logic-apps-overview Microsoft Learn: Overview of Azure Logic Apps]&lt;br /&gt;
* [https://learn.microsoft.com/en-us/azure/azure-functions/functions-compare-logic-apps-ms-flow-webjobs Microsoft Learn: Compare Azure Functions and Azure Logic Apps]&lt;br /&gt;
&lt;br /&gt;
== DP-420 Style Practice Questions ==&lt;br /&gt;
&#039;&#039;&#039;Q1.&#039;&#039;&#039; When should you choose Azure Logic Apps over Azure Functions to integrate with Azure Cosmos DB?&lt;br /&gt;
* A. When building low-code, visual workflow orchestrations and integrating with enterprise SaaS services like Salesforce or Office 365&lt;br /&gt;
* B. When sub-millisecond custom compute and high-frequency algorithms are required&lt;br /&gt;
* C. When you need to define custom composite indexing policies&lt;br /&gt;
* D. When executing JavaScript stored procedures inside a logical partition&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q2.&#039;&#039;&#039; What enables Azure Logic Apps to trigger automated workflows based on new or updated documents in Cosmos DB?&lt;br /&gt;
* A. The Azure Cosmos DB connector&#039;s change feed trigger (&#039;When an item is created or modified&#039;)&lt;br /&gt;
* B. Continuous backup point-in-time restore log polling&lt;br /&gt;
* C. Cosmos DB Operator ARM role events exclusively&lt;br /&gt;
* D. Diagnostic log ingestion into Log Analytics workspaces&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q3.&#039;&#039;&#039; Which capability is provided by the Azure Cosmos DB connector actions within Azure Logic Apps?&lt;br /&gt;
* A. Reading, creating/updating, querying with SQL, and deleting documents within Cosmos DB containers&lt;br /&gt;
* B. Provisioning physical partition hardware and rebalancing storage manually&lt;br /&gt;
* C. Overriding the 20 GB logical partition storage limit&lt;br /&gt;
* D. Running analytical queries without enabling Azure Synapse Link&lt;br /&gt;
&lt;br /&gt;
== Answer Key ==&lt;br /&gt;
&#039;&#039;Answers are listed at the very end so you can attempt the questions first.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Q1 (Azure Logic Apps):&#039;&#039;&#039; A. When building low-code, visual workflow orchestrations and integrating with enterprise SaaS services like Salesforce or Office 365 — Azure Logic Apps is designed for visual, declarative workflow orchestrations and out-of-the-box SaaS connectors, whereas Azure Functions is designed for custom code execution.&lt;br /&gt;
* &#039;&#039;&#039;Q2 (Azure Logic Apps):&#039;&#039;&#039; A. The Azure Cosmos DB connector&#039;s change feed trigger (&#039;When an item is created or modified&#039;) — The Cosmos DB connector in Logic Apps uses the change feed trigger to execute workflows whenever documents are created or updated.&lt;br /&gt;
* &#039;&#039;&#039;Q3 (Azure Logic Apps):&#039;&#039;&#039; A. Reading, creating/updating, querying with SQL, and deleting documents within Cosmos DB containers — The connector provides actions for standard document operations (create, replace, read, query, delete) directly within a workflow step.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;DP-420: Designing and Implementing Cloud-Native Applications Using Microsoft Azure Cosmos DB — term detail page&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[Category:DP-420 Terminology]]&lt;br /&gt;
[[Category:Integration &amp;amp; Analytics]]&lt;/div&gt;</summary>
		<author><name>Anko</name></author>
	</entry>
	<entry>
		<id>https://ilianko.com/index.php?title=Azure_Functions_Integration&amp;diff=6217</id>
		<title>Azure Functions Integration</title>
		<link rel="alternate" type="text/html" href="https://ilianko.com/index.php?title=Azure_Functions_Integration&amp;diff=6217"/>
		<updated>2026-10-26T15:07:34Z</updated>

		<summary type="html">&lt;p&gt;Anko: Recreated DP-420 term page: Azure Functions Integration (Integration &amp;amp; Analytics)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;amp;larr; Back to [[DP-420: Azure Cosmos DB Developer Specialty|DP-420 Terminology Reference]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Category:&#039;&#039;&#039; Integration &amp;amp; Analytics&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Summary:&#039;&#039;&#039; Serverless compute triggered by Cosmos DB change feed for event-driven processing, denormalization, and data movement.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
Azure Functions is a serverless, event-driven compute platform that integrates natively with Azure Cosmos DB through triggers, input bindings, and output bindings. The Azure Cosmos DB trigger uses the change feed processor under the hood to automatically execute code in response to item inserts and updates across partitions, maintaining state via a leases container. Common architectural patterns tested on the DP-420 exam include using Azure Functions + Change Feed for real-time denormalization, cross-container referential integrity enforcement, materializing aggregates, event streaming to Event Hubs or Service Bus, and archiving historical data to Azure Blob Storage.&lt;br /&gt;
&lt;br /&gt;
Example (C# Isolated Worker): Azure Functions Cosmos DB Trigger with Output Binding&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[Function(&amp;quot;ProcessOrderChangeFeed&amp;quot;)]&lt;br /&gt;
[CosmosDBOutput(&amp;quot;ecommerce&amp;quot;, &amp;quot;orderSummaries&amp;quot;, Connection = &amp;quot;CosmosDBConnection&amp;quot;)]&lt;br /&gt;
public static OrderSummary Run(&lt;br /&gt;
    [CosmosDBTrigger(&lt;br /&gt;
        databaseName: &amp;quot;ecommerce&amp;quot;,&lt;br /&gt;
        containerName: &amp;quot;orders&amp;quot;,&lt;br /&gt;
        Connection = &amp;quot;CosmosDBConnection&amp;quot;,&lt;br /&gt;
        LeaseContainerName: &amp;quot;leases&amp;quot;,&lt;br /&gt;
        CreateLeaseContainerIfNotExists = true)] IReadOnlyList&amp;amp;lt;Order&amp;amp;gt; input,&lt;br /&gt;
    FunctionContext context)&lt;br /&gt;
{&lt;br /&gt;
    var logger = context.GetLogger(&amp;quot;ProcessOrderChangeFeed&amp;quot;);&lt;br /&gt;
    logger.LogInformation(&amp;quot;Processing {Count} changed orders&amp;quot;, input.Count);&lt;br /&gt;
&lt;br /&gt;
    // Compute denormalized summary to write to orderSummaries container via output binding&lt;br /&gt;
    return new OrderSummary&lt;br /&gt;
    {&lt;br /&gt;
        Id = Guid.NewGuid().ToString(),&lt;br /&gt;
        CustomerId = input[0].CustomerId,&lt;br /&gt;
        LastProcessedUtc = DateTime.UtcNow,&lt;br /&gt;
        TotalOrdersCount = input.Count&lt;br /&gt;
    };&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This serverless function triggers on inserts/updates from the &amp;lt;code&amp;gt;orders&amp;lt;/code&amp;gt; container using the change feed, processes the batch, and writes a denormalized record to &amp;lt;code&amp;gt;orderSummaries&amp;lt;/code&amp;gt; via a declarative &amp;lt;code&amp;gt;CosmosDBOutput&amp;lt;/code&amp;gt; binding.&lt;br /&gt;
&lt;br /&gt;
== More Info &amp;amp; Links ==&lt;br /&gt;
* [https://learn.microsoft.com/en-us/azure/azure-functions/functions-bindings-cosmosdb-v2-trigger Microsoft Learn: Azure Cosmos DB trigger for Azure Functions]&lt;br /&gt;
* [https://learn.microsoft.com/en-us/azure/azure-functions/functions-bindings-cosmosdb-v2-input Microsoft Learn: Azure Cosmos DB input and output bindings for Azure Functions]&lt;br /&gt;
* [https://learn.microsoft.com/en-us/azure/cosmos-db/nosql/serverless-computing-database Microsoft Learn: Serverless computing with Azure Cosmos DB and Azure Functions]&lt;br /&gt;
&lt;br /&gt;
== DP-420 Style Practice Questions ==&lt;br /&gt;
&#039;&#039;&#039;Q1.&#039;&#039;&#039; What mechanism does the Azure Functions Azure Cosmos DB trigger use to detect data changes across partitions?&lt;br /&gt;
* A. The Azure Cosmos DB change feed, managed via a leases container to track state and checkpoints across partitions&lt;br /&gt;
* B. Polling SQL API queries executed against the container every 60 seconds&lt;br /&gt;
* C. Continuous point-in-time restore transaction logs exported to storage&lt;br /&gt;
* D. Server-side JavaScript triggers that invoke an external HTTP webhook&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q2.&#039;&#039;&#039; Which scenario represents a common DP-420 design pattern combining Azure Cosmos DB change feed with Azure Functions?&lt;br /&gt;
* A. Materializing and denormalizing data into another container to optimize read queries&lt;br /&gt;
* B. Replacing the need for a partition key in large containers&lt;br /&gt;
* C. Converting transactional store data directly into column-oriented analytical store format&lt;br /&gt;
* D. Generating periodic backup snapshots on a 4-hour schedule&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q3.&#039;&#039;&#039; What happens when an Azure Functions output binding writes to an Azure Cosmos DB container?&lt;br /&gt;
* A. It automatically creates or upserts documents using the configured connection and container name without custom SDK boilerplate code&lt;br /&gt;
* B. It always forces an expensive cross-partition query before writing&lt;br /&gt;
* C. It bypasses RU charges by writing through the analytical store&lt;br /&gt;
* D. It automatically migrates the container to autoscale throughput&lt;br /&gt;
&lt;br /&gt;
== Answer Key ==&lt;br /&gt;
&#039;&#039;Answers are listed at the very end so you can attempt the questions first.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Q1 (Azure Functions Integration):&#039;&#039;&#039; A. The Azure Cosmos DB change feed, managed via a leases container to track state and checkpoints across partitions — The Azure Cosmos DB trigger is built on the Change Feed Processor, which uses a leases container to track checkpoints and distribute partition processing across function instances.&lt;br /&gt;
* &#039;&#039;&#039;Q2 (Azure Functions Integration):&#039;&#039;&#039; A. Materializing and denormalizing data into another container to optimize read queries — Change feed-triggered Azure Functions are standard for asynchronous denormalization, cross-container synchronization, and maintaining materialized views.&lt;br /&gt;
* &#039;&#039;&#039;Q3 (Azure Functions Integration):&#039;&#039;&#039; A. It automatically creates or upserts documents using the configured connection and container name without custom SDK boilerplate code — Cosmos DB output bindings allow declarative writing/upserting of documents directly from the function return value or out parameters without managing SDK clients manually.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;DP-420: Designing and Implementing Cloud-Native Applications Using Microsoft Azure Cosmos DB — term detail page&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[Category:DP-420 Terminology]]&lt;br /&gt;
[[Category:Integration &amp;amp; Analytics]]&lt;/div&gt;</summary>
		<author><name>Anko</name></author>
	</entry>
	<entry>
		<id>https://ilianko.com/index.php?title=Direct_Lake&amp;diff=6216</id>
		<title>Direct Lake</title>
		<link rel="alternate" type="text/html" href="https://ilianko.com/index.php?title=Direct_Lake&amp;diff=6216"/>
		<updated>2026-10-26T15:07:33Z</updated>

		<summary type="html">&lt;p&gt;Anko: Recreated DP-420 term page: Direct Lake (Integration &amp;amp; Analytics)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;amp;larr; Back to [[DP-420: Azure Cosmos DB Developer Specialty|DP-420 Terminology Reference]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Category:&#039;&#039;&#039; Integration &amp;amp; Analytics&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Summary:&#039;&#039;&#039; Power BI mode reading Delta tables directly from OneLake — near-Import speed, always fresh.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
Direct Lake is a Power BI/Microsoft Fabric storage mode that loads Delta-format data directly from OneLake into memory for reporting, without requiring a traditional Import (full data copy) or DirectQuery (live query passthrough) step. This gives near-Import query performance while always reflecting the latest data in OneLake — including data mirrored from Azure Cosmos DB — without duplicating storage or building separate ETL/refresh pipelines.&lt;br /&gt;
&lt;br /&gt;
== More Info &amp;amp; Links ==&lt;br /&gt;
* [https://learn.microsoft.com/en-us/fabric/get-started/direct-lake-overview Microsoft Learn: Direct Lake overview]&lt;br /&gt;
&lt;br /&gt;
== DP-420 Style Practice Questions ==&lt;br /&gt;
&#039;&#039;&#039;Q1.&#039;&#039;&#039; What problem does Direct Lake mode solve compared to traditional Import and DirectQuery modes?&lt;br /&gt;
* A. It provides near-Import performance while reading Delta data directly from OneLake without a full data copy&lt;br /&gt;
* B. It replaces the need for a partition key in Azure Cosmos DB&lt;br /&gt;
* C. It removes the need for Delta format entirely&lt;br /&gt;
* D. It requires a separate ETL pipeline for every refresh&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q2.&#039;&#039;&#039; What must the underlying data be stored as in OneLake for Direct Lake mode to read it directly?&lt;br /&gt;
* A. Delta format tables&lt;br /&gt;
* B. Raw JSON documents&lt;br /&gt;
* C. XML files&lt;br /&gt;
* D. Cosmos DB backup snapshots&lt;br /&gt;
&lt;br /&gt;
== Answer Key ==&lt;br /&gt;
&#039;&#039;Answers are listed at the very end so you can attempt the questions first.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Q1 (Direct Lake):&#039;&#039;&#039; A. It provides near-Import performance while reading Delta data directly from OneLake without a full data copy — Direct Lake reads Delta tables directly from OneLake, combining Import-like speed with DirectQuery-like freshness and no data duplication.&lt;br /&gt;
* &#039;&#039;&#039;Q2 (Direct Lake):&#039;&#039;&#039; A. Delta format tables — Direct Lake requires the data to be stored in OneLake as Delta format tables, such as those produced by Cosmos DB Mirroring for Fabric.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;DP-420: Designing and Implementing Cloud-Native Applications Using Microsoft Azure Cosmos DB — term detail page&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[Category:DP-420 Terminology]]&lt;br /&gt;
[[Category:Integration &amp;amp; Analytics]]&lt;/div&gt;</summary>
		<author><name>Anko</name></author>
	</entry>
	<entry>
		<id>https://ilianko.com/index.php?title=Serverless_SQL_Pool&amp;diff=6215</id>
		<title>Serverless SQL Pool</title>
		<link rel="alternate" type="text/html" href="https://ilianko.com/index.php?title=Serverless_SQL_Pool&amp;diff=6215"/>
		<updated>2026-10-26T15:07:33Z</updated>

		<summary type="html">&lt;p&gt;Anko: Recreated DP-420 term page: Serverless SQL Pool (Integration &amp;amp; Analytics)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;amp;larr; Back to [[DP-420: Azure Cosmos DB Developer Specialty|DP-420 Terminology Reference]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Category:&#039;&#039;&#039; Integration &amp;amp; Analytics&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Summary:&#039;&#039;&#039; On-demand T-SQL query service in Azure Synapse to query Cosmos DB analytical store via OPENROWSET.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
A serverless SQL pool is an on-demand, serverless data-processing service in Azure Synapse Analytics that enables data engineers and analysts to run Transact-SQL (T-SQL) queries directly over data in external stores without provisioning or managing reserved cluster capacity. In the DP-420 exam and Azure Cosmos DB scenarios, serverless SQL pools are used to query the Cosmos DB analytical store (enabled via Azure Synapse Link) in near real time using the OPENROWSET function with provider &#039;CosmosDB&#039;. This enables hybrid transactional/analytical processing (HTAP) and BI reporting (e.g. creating SQL views for Power BI) without consuming transactional Request Units (RUs) or running heavy ETL jobs.&lt;br /&gt;
&lt;br /&gt;
Example 1 (T-SQL): Query Cosmos DB analytical store using OPENROWSET with automatic schema inference&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SELECT TOP 100 *&lt;br /&gt;
FROM OPENROWSET(&lt;br /&gt;
    &#039;CosmosDB&#039;,&lt;br /&gt;
    &#039;Account=mycosmosaccount;Database=ecommerce;Key=AccountKeyOrSecret&#039;,&lt;br /&gt;
    Orders&lt;br /&gt;
) AS [orders];&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This query reads directly from the &amp;lt;code&amp;gt;Orders&amp;lt;/code&amp;gt; container&#039;s analytical store without consuming operational RUs from the transactional store.&lt;br /&gt;
&lt;br /&gt;
Example 2 (T-SQL): Query with explicit schema and credential using WITH clause&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SELECT&lt;br /&gt;
    OrderId,&lt;br /&gt;
    CustomerId,&lt;br /&gt;
    OrderDate,&lt;br /&gt;
    TotalAmount&lt;br /&gt;
FROM OPENROWSET(&lt;br /&gt;
    &#039;CosmosDB&#039;,&lt;br /&gt;
    &#039;Connection=https://mycosmosaccount.documents.azure.com;Database=ecommerce&#039;,&lt;br /&gt;
    Orders&lt;br /&gt;
)&lt;br /&gt;
WITH (&lt;br /&gt;
    OrderId VARCHAR(50) &#039;$.id&#039;,&lt;br /&gt;
    CustomerId VARCHAR(50) &#039;$.customerId&#039;,&lt;br /&gt;
    OrderDate DATETIME2 &#039;$.orderDate&#039;,&lt;br /&gt;
    TotalAmount DECIMAL(18,2) &#039;$.total&#039;&lt;br /&gt;
) AS [orders];&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using the &amp;lt;code&amp;gt;WITH&amp;lt;/code&amp;gt; clause explicitly defines column types and JSON property paths, optimizing query performance, reducing data processing charges, and enabling clean creation of relational views for Power BI reporting.&lt;br /&gt;
&lt;br /&gt;
== More Info &amp;amp; Links ==&lt;br /&gt;
* [https://learn.microsoft.com/en-us/azure/synapse-analytics/sql/query-cosmos-db-analytical-store Microsoft Learn: Query Azure Cosmos DB data using a serverless SQL pool in Azure Synapse Link]&lt;br /&gt;
* [https://learn.microsoft.com/en-us/azure/synapse-analytics/sql/develop-openrowset Microsoft Learn: How to use OPENROWSET in serverless SQL pool]&lt;br /&gt;
* [https://learn.microsoft.com/en-us/azure/cosmos-db/synapse-link Microsoft Learn: Azure Synapse Link for Azure Cosmos DB]&lt;br /&gt;
&lt;br /&gt;
== DP-420 Style Practice Questions ==&lt;br /&gt;
&#039;&#039;&#039;Q1.&#039;&#039;&#039; How does a serverless SQL pool access Azure Cosmos DB data in Azure Synapse Link?&lt;br /&gt;
* A. By executing T-SQL queries using the OPENROWSET function targeting the container&#039;s analytical store&lt;br /&gt;
* B. By sending SQL API queries through the Cosmos DB SDK Gateway connection mode&lt;br /&gt;
* C. By establishing a direct TCP socket connection to Cosmos DB physical partition replicas&lt;br /&gt;
* D. By triggering a Cosmos DB stored procedure to export data to CSV files&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q2.&#039;&#039;&#039; What is the RU impact on the Cosmos DB transactional store when running queries from a serverless SQL pool over the analytical store?&lt;br /&gt;
* A. Zero RUs consumed from the transactional store, because the analytical store is fully isolated from transactional throughput&lt;br /&gt;
* B. Equal RU cost to running the query via the Cosmos DB API for NoSQL&lt;br /&gt;
* C. It consumes half the RUs of a standard cross-partition transactional query&lt;br /&gt;
* D. It consumes RUs only if the query scans more than 20 GB of data&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q3.&#039;&#039;&#039; Why is specifying an explicit schema in the WITH clause of OPENROWSET recommended for serverless SQL pools querying Cosmos DB?&lt;br /&gt;
* A. It defines precise column types and paths, improving query performance and avoiding default wide types like VARCHAR(8000)&lt;br /&gt;
* B. It is mandatory because automatic schema inference is not supported for Cosmos DB&lt;br /&gt;
* C. It encrypts the results using Customer-Managed Keys (CMK) automatically&lt;br /&gt;
* D. It migrates the analytical store container directly into Delta format&lt;br /&gt;
&lt;br /&gt;
== Answer Key ==&lt;br /&gt;
&#039;&#039;Answers are listed at the very end so you can attempt the questions first.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Q1 (Serverless SQL Pool):&#039;&#039;&#039; A. By executing T-SQL queries using the OPENROWSET function targeting the container&#039;s analytical store — Serverless SQL pools use the OPENROWSET function with provider &#039;CosmosDB&#039; to query the analytical store directly.&lt;br /&gt;
* &#039;&#039;&#039;Q2 (Serverless SQL Pool):&#039;&#039;&#039; A. Zero RUs consumed from the transactional store, because the analytical store is fully isolated from transactional throughput — The analytical store has independent column-store storage and synchronization; querying it via serverless SQL pools has no RU impact on the transactional store.&lt;br /&gt;
* &#039;&#039;&#039;Q3 (Serverless SQL Pool):&#039;&#039;&#039; A. It defines precise column types and paths, improving query performance and avoiding default wide types like VARCHAR(8000) — The WITH clause provides explicit typing and JSON property mapping, which optimizes query execution and prevents inefficient fallback types like VARCHAR(8000).&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;DP-420: Designing and Implementing Cloud-Native Applications Using Microsoft Azure Cosmos DB — term detail page&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[Category:DP-420 Terminology]]&lt;br /&gt;
[[Category:Integration &amp;amp; Analytics]]&lt;/div&gt;</summary>
		<author><name>Anko</name></author>
	</entry>
	<entry>
		<id>https://ilianko.com/index.php?title=Apache_Spark&amp;diff=6214</id>
		<title>Apache Spark</title>
		<link rel="alternate" type="text/html" href="https://ilianko.com/index.php?title=Apache_Spark&amp;diff=6214"/>
		<updated>2026-10-26T15:07:33Z</updated>

		<summary type="html">&lt;p&gt;Anko: Recreated DP-420 term page: Apache Spark (Integration &amp;amp; Analytics)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;amp;larr; Back to [[DP-420: Azure Cosmos DB Developer Specialty|DP-420 Terminology Reference]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Category:&#039;&#039;&#039; Integration &amp;amp; Analytics&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Summary:&#039;&#039;&#039; Distributed processing engine used in Synapse/Fabric notebooks to analyze Cosmos DB data.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
Apache Spark is a distributed, in-memory data processing engine commonly used within Azure Synapse Analytics and Microsoft Fabric (via Spark notebooks/pools) to run large-scale ETL, data engineering, and analytics workloads. In the context of Azure Cosmos DB, Spark is used to query the analytical store (via the Cosmos DB Spark connector) for HTAP-style analytics, or to process Delta-format data already mirrored into OneLake.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
| Feature                     | Spark Connector (OLTP) | Synapse Link (Analytical Store) |&lt;br /&gt;
| --------------------------- | ---------------------- | ------------------------------- |&lt;br /&gt;
| Read data                   | ✅                      | ✅                               |&lt;br /&gt;
| Write data                  | ✅                      | ❌                               |&lt;br /&gt;
| Update data                 | ✅                      | ❌                               |&lt;br /&gt;
| Delete data                 | ✅                      | ❌                               |&lt;br /&gt;
| T-SQL queries               | ❌                      | ✅ (Serverless SQL Pool)         |&lt;br /&gt;
| Analytics on large datasets | Limited                 | ✅                               |&lt;br /&gt;
| Uses transactional store    | ✅                      | ❌                               |&lt;br /&gt;
| Uses analytical store       | ❌                      | ✅                               |&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== More Info &amp;amp; Links ==&lt;br /&gt;
* [https://learn.microsoft.com/en-us/azure/cosmos-db/nosql/spark-connector Microsoft Learn: Azure Cosmos DB Spark connector]&lt;br /&gt;
&lt;br /&gt;
== DP-420 Style Practice Questions ==&lt;br /&gt;
&#039;&#039;&#039;Q1.&#039;&#039;&#039; How is Apache Spark commonly used with Azure Cosmos DB?&lt;br /&gt;
* A. To query the analytical store or process mirrored Delta data for large-scale analytics/ETL&lt;br /&gt;
* B. To provision Azure Cosmos DB throughput&lt;br /&gt;
* C. To define a container&#039;s partition key&lt;br /&gt;
* D. To manage RBAC role assignments&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q2.&#039;&#039;&#039; Where does Apache Spark typically run when working with Azure Cosmos DB analytical data?&lt;br /&gt;
* A. Within Azure Synapse Analytics or Microsoft Fabric Spark pools/notebooks&lt;br /&gt;
* B. Inside a Cosmos DB stored procedure&lt;br /&gt;
* C. As a Cosmos DB trigger&lt;br /&gt;
* D. Inside the Cosmos DB emulator&lt;br /&gt;
&lt;br /&gt;
== Answer Key ==&lt;br /&gt;
&#039;&#039;Answers are listed at the very end so you can attempt the questions first.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Q1 (Apache Spark):&#039;&#039;&#039; A. To query the analytical store or process mirrored Delta data for large-scale analytics/ETL — Apache Spark, via the Cosmos DB Spark connector or Fabric notebooks, is used for analytics and ETL over Cosmos DB&#039;s analytical/mirrored data.&lt;br /&gt;
* &#039;&#039;&#039;Q2 (Apache Spark):&#039;&#039;&#039; A. Within Azure Synapse Analytics or Microsoft Fabric Spark pools/notebooks — Spark workloads for Cosmos DB analytics run in Synapse Spark pools or Fabric Spark notebooks, not inside Cosmos DB itself.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;DP-420: Designing and Implementing Cloud-Native Applications Using Microsoft Azure Cosmos DB — term detail page&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[Category:DP-420 Terminology]]&lt;br /&gt;
[[Category:Integration &amp;amp; Analytics]]&lt;/div&gt;</summary>
		<author><name>Anko</name></author>
	</entry>
	<entry>
		<id>https://ilianko.com/index.php?title=Delta_Format&amp;diff=6213</id>
		<title>Delta Format</title>
		<link rel="alternate" type="text/html" href="https://ilianko.com/index.php?title=Delta_Format&amp;diff=6213"/>
		<updated>2026-10-26T15:07:32Z</updated>

		<summary type="html">&lt;p&gt;Anko: Recreated DP-420 term page: Delta Format (Integration &amp;amp; Analytics)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;amp;larr; Back to [[DP-420: Azure Cosmos DB Developer Specialty|DP-420 Terminology Reference]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Category:&#039;&#039;&#039; Integration &amp;amp; Analytics&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Summary:&#039;&#039;&#039; Open-source ACID table format (Delta Lake) used for all data stored in OneLake.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
Delta format (Delta Lake) is an open-source storage format that adds ACID transactions, schema enforcement, and time-travel versioning on top of Parquet files. It is the standard table format used throughout Microsoft Fabric&#039;s OneLake, meaning data mirrored from Azure Cosmos DB (or processed by Apache Spark) is stored as Delta tables, enabling reliable, consistent reads across multiple engines (Spark, SQL, Power BI) without data duplication or format conversion.&lt;br /&gt;
&lt;br /&gt;
== More Info &amp;amp; Links ==&lt;br /&gt;
* [https://learn.microsoft.com/en-us/fabric/data-engineering/lakehouse-and-delta-tables Microsoft Learn: Delta Lake table format in Fabric]&lt;br /&gt;
&lt;br /&gt;
== DP-420 Style Practice Questions ==&lt;br /&gt;
&#039;&#039;&#039;Q1.&#039;&#039;&#039; What capability does the Delta format add on top of Parquet files?&lt;br /&gt;
* A. ACID transactions, schema enforcement, and time-travel versioning&lt;br /&gt;
* B. Native support for the MongoDB query language&lt;br /&gt;
* C. Automatic partition key selection&lt;br /&gt;
* D. Built-in RU consumption metering&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q2.&#039;&#039;&#039; Why is the Delta format significant for data mirrored from Azure Cosmos DB into OneLake?&lt;br /&gt;
* A. It provides a consistent, open table format readable by multiple Fabric engines without conversion&lt;br /&gt;
* B. It encrypts the data using customer-managed keys automatically&lt;br /&gt;
* C. It reduces Azure Cosmos DB&#039;s transactional RU costs&lt;br /&gt;
* D. It enforces the container&#039;s partition key across Fabric&lt;br /&gt;
&lt;br /&gt;
== Answer Key ==&lt;br /&gt;
&#039;&#039;Answers are listed at the very end so you can attempt the questions first.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Q1 (Delta Format):&#039;&#039;&#039; A. ACID transactions, schema enforcement, and time-travel versioning — Delta Lake (Delta format) extends Parquet with ACID transactions, schema enforcement, and versioning/time travel.&lt;br /&gt;
* &#039;&#039;&#039;Q2 (Delta Format):&#039;&#039;&#039; A. It provides a consistent, open table format readable by multiple Fabric engines without conversion — Storing mirrored data as Delta tables lets Spark, SQL, and Power BI all read the same consistent data without separate copies or conversions.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;DP-420: Designing and Implementing Cloud-Native Applications Using Microsoft Azure Cosmos DB — term detail page&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[Category:DP-420 Terminology]]&lt;br /&gt;
[[Category:Integration &amp;amp; Analytics]]&lt;/div&gt;</summary>
		<author><name>Anko</name></author>
	</entry>
	<entry>
		<id>https://ilianko.com/index.php?title=OneLake&amp;diff=6212</id>
		<title>OneLake</title>
		<link rel="alternate" type="text/html" href="https://ilianko.com/index.php?title=OneLake&amp;diff=6212"/>
		<updated>2026-10-26T15:07:32Z</updated>

		<summary type="html">&lt;p&gt;Anko: Recreated DP-420 term page: OneLake (Integration &amp;amp; Analytics)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;amp;larr; Back to [[DP-420: Azure Cosmos DB Developer Specialty|DP-420 Terminology Reference]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Category:&#039;&#039;&#039; Integration &amp;amp; Analytics&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Summary:&#039;&#039;&#039; Fabric&#039;s single, unified, tenant-wide data lake storing all workloads&#039; data in Delta format.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
OneLake is Microsoft Fabric&#039;s single, unified, tenant-wide data lake (built on Azure Data Lake Storage Gen2) that automatically stores data for every Fabric workload in one open, shareable location — eliminating the need for teams to copy or duplicate data across separate lakes. When Azure Cosmos DB Mirroring for Fabric is enabled, mirrored data lands directly in OneLake in Delta format, immediately available to Spark notebooks, Direct Lake-mode Power BI reports, and other Fabric experiences without additional data movement.&lt;br /&gt;
&lt;br /&gt;
== More Info &amp;amp; Links ==&lt;br /&gt;
* [https://learn.microsoft.com/en-us/fabric/onelake/onelake-overview Microsoft Learn: OneLake overview]&lt;br /&gt;
&lt;br /&gt;
== DP-420 Style Practice Questions ==&lt;br /&gt;
&#039;&#039;&#039;Q1.&#039;&#039;&#039; What is OneLake in Microsoft Fabric?&lt;br /&gt;
* A. A single, unified, tenant-wide data lake shared across all Fabric workloads&lt;br /&gt;
* B. A per-workspace cache used only by Power BI&lt;br /&gt;
* C. A dedicated backup store for Azure Cosmos DB&lt;br /&gt;
* D. A replacement for Azure Cosmos DB&#039;s transactional store&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q2.&#039;&#039;&#039; In what format does Azure Cosmos DB Mirroring for Fabric store data once it lands in OneLake?&lt;br /&gt;
* A. Delta format&lt;br /&gt;
* B. Raw JSON documents only&lt;br /&gt;
* C. A proprietary binary Cosmos DB format&lt;br /&gt;
* D. CSV files&lt;br /&gt;
&lt;br /&gt;
== Answer Key ==&lt;br /&gt;
&#039;&#039;Answers are listed at the very end so you can attempt the questions first.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Q1 (OneLake):&#039;&#039;&#039; A. A single, unified, tenant-wide data lake shared across all Fabric workloads — OneLake is Fabric&#039;s single logical data lake for the entire tenant, shared automatically across workloads.&lt;br /&gt;
* &#039;&#039;&#039;Q2 (OneLake):&#039;&#039;&#039; A. Delta format — Mirrored data is stored in OneLake as open Delta format tables, making it directly queryable by Fabric engines.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;DP-420: Designing and Implementing Cloud-Native Applications Using Microsoft Azure Cosmos DB — term detail page&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[Category:DP-420 Terminology]]&lt;br /&gt;
[[Category:Integration &amp;amp; Analytics]]&lt;/div&gt;</summary>
		<author><name>Anko</name></author>
	</entry>
	<entry>
		<id>https://ilianko.com/index.php?title=Azure_Cosmos_DB_Mirroring_for_Fabric&amp;diff=6211</id>
		<title>Azure Cosmos DB Mirroring for Fabric</title>
		<link rel="alternate" type="text/html" href="https://ilianko.com/index.php?title=Azure_Cosmos_DB_Mirroring_for_Fabric&amp;diff=6211"/>
		<updated>2026-10-26T15:07:32Z</updated>

		<summary type="html">&lt;p&gt;Anko: Recreated DP-420 term page: Azure Cosmos DB Mirroring for Fabric (Integration &amp;amp; Analytics)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;amp;larr; Back to [[DP-420: Azure Cosmos DB Developer Specialty|DP-420 Terminology Reference]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Category:&#039;&#039;&#039; Integration &amp;amp; Analytics&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Summary:&#039;&#039;&#039; Near real-time replication of Cosmos DB data into Microsoft Fabric&#039;s OneLake.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
Azure Cosmos DB Mirroring for Microsoft Fabric continuously replicates Azure Cosmos DB data into Microsoft Fabric&#039;s OneLake in near real time, storing it in open Delta format, and making the data available for unified analytics, reporting, and cross-workload querying within Fabric (including via Direct Lake) without a separate ETL/copy pipeline, complementing (and in newer scenarios, replacing) the older Synapse Link/Spark connector approach.&lt;br /&gt;
&lt;br /&gt;
== More Info &amp;amp; Links ==&lt;br /&gt;
* [https://learn.microsoft.com/en-us/fabric/database/mirrored-database/azure-cosmos-db Microsoft Learn: Mirroring Azure Cosmos DB in Microsoft Fabric]&lt;br /&gt;
&lt;br /&gt;
== DP-420 Style Practice Questions ==&lt;br /&gt;
&#039;&#039;&#039;Q1.&#039;&#039;&#039; What does Azure Cosmos DB Mirroring for Microsoft Fabric provide?&lt;br /&gt;
* A. Near real-time replication of Cosmos DB data into Fabric&#039;s OneLake for unified analytics without a separate ETL pipeline&lt;br /&gt;
* B. A backup mechanism for disaster recovery only&lt;br /&gt;
* C. A way to enable multi-region writes&lt;br /&gt;
* D. A tool for managing RBAC permissions&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q2.&#039;&#039;&#039; When choosing between Azure Cosmos DB Mirroring and the Spark connector for analytics, what is a key consideration?&lt;br /&gt;
* A. Mirroring offers simpler, near real-time replication into Fabric OneLake without custom Spark code&lt;br /&gt;
* B. The Spark connector is required for any read access to Cosmos DB&lt;br /&gt;
* C. Mirroring only supports the MongoDB API&lt;br /&gt;
* D. The Spark connector cannot write data back to Cosmos DB&lt;br /&gt;
&lt;br /&gt;
== Answer Key ==&lt;br /&gt;
&#039;&#039;Answers are listed at the very end so you can attempt the questions first.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Q1 (Azure Cosmos DB Mirroring for Fabric):&#039;&#039;&#039; A. Near real-time replication of Cosmos DB data into Fabric&#039;s OneLake for unified analytics without a separate ETL pipeline — Mirroring continuously replicates data into OneLake for analytics, avoiding the need for custom ETL.&lt;br /&gt;
* &#039;&#039;&#039;Q2 (Azure Cosmos DB Mirroring for Fabric):&#039;&#039;&#039; A. Mirroring offers simpler, near real-time replication into Fabric OneLake without custom Spark code — Mirroring provides a low-code, near real-time path into Fabric OneLake, while the Spark connector offers more custom control via code.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;DP-420: Designing and Implementing Cloud-Native Applications Using Microsoft Azure Cosmos DB — term detail page&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[Category:DP-420 Terminology]]&lt;br /&gt;
[[Category:Integration &amp;amp; Analytics]]&lt;/div&gt;</summary>
		<author><name>Anko</name></author>
	</entry>
	<entry>
		<id>https://ilianko.com/index.php?title=Azure_Synapse_Link_/_Analytical_Store&amp;diff=6210</id>
		<title>Azure Synapse Link / Analytical Store</title>
		<link rel="alternate" type="text/html" href="https://ilianko.com/index.php?title=Azure_Synapse_Link_/_Analytical_Store&amp;diff=6210"/>
		<updated>2026-10-26T15:07:31Z</updated>

		<summary type="html">&lt;p&gt;Anko: Recreated DP-420 term page: Azure Synapse Link / Analytical Store (Integration &amp;amp; Analytics)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;amp;larr; Back to [[DP-420: Azure Cosmos DB Developer Specialty|DP-420 Terminology Reference]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Category:&#039;&#039;&#039; Integration &amp;amp; Analytics&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Summary:&#039;&#039;&#039; Near real-time analytics via a separate column-store, no RU impact on transactional data.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
Azure Synapse Link for Azure Cosmos DB enables near real-time analytics over operational data by automatically syncing changes into a separate, column-oriented analytical store, without impacting the performance or consuming the RUs of the transactional (OLTP) workload. Analytical store data can then be queried from Azure Synapse Apache Spark or Synapse SQL serverless, enabling hybrid transactional/analytical processing (HTAP) without complex ETL pipelines.&lt;br /&gt;
&lt;br /&gt;
== More Info &amp;amp; Links ==&lt;br /&gt;
* [https://learn.microsoft.com/en-us/azure/cosmos-db/synapse-link Microsoft Learn: Azure Synapse Link for Azure Cosmos DB]&lt;br /&gt;
&lt;br /&gt;
== DP-420 Style Practice Questions ==&lt;br /&gt;
&#039;&#039;&#039;Q1.&#039;&#039;&#039; What is the primary benefit of enabling the analytical store via Azure Synapse Link?&lt;br /&gt;
* A. Near real-time analytics over operational data without consuming transactional RUs or requiring ETL&lt;br /&gt;
* B. Reduced storage costs for the transactional store&lt;br /&gt;
* C. Automatic multi-region writes&lt;br /&gt;
* D. Stronger consistency for transactional queries&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q2.&#039;&#039;&#039; From which services can you query the Azure Cosmos DB analytical store?&lt;br /&gt;
* A. Azure Synapse Spark or Synapse SQL serverless&lt;br /&gt;
* B. Only from the Azure Cosmos DB SDK&lt;br /&gt;
* C. Only from Power BI directly&lt;br /&gt;
* D. Only from Azure Functions&lt;br /&gt;
&lt;br /&gt;
== Answer Key ==&lt;br /&gt;
&#039;&#039;Answers are listed at the very end so you can attempt the questions first.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Q1 (Azure Synapse Link / Analytical Store):&#039;&#039;&#039; A. Near real-time analytics over operational data without consuming transactional RUs or requiring ETL — Synapse Link syncs data into a separate analytical store, enabling analytics without impacting transactional RU consumption.&lt;br /&gt;
* &#039;&#039;&#039;Q2 (Azure Synapse Link / Analytical Store):&#039;&#039;&#039; A. Azure Synapse Spark or Synapse SQL serverless — The analytical store is designed to be queried from Azure Synapse Spark pools or Synapse SQL serverless.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;DP-420: Designing and Implementing Cloud-Native Applications Using Microsoft Azure Cosmos DB — term detail page&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[Category:DP-420 Terminology]]&lt;br /&gt;
[[Category:Integration &amp;amp; Analytics]]&lt;/div&gt;</summary>
		<author><name>Anko</name></author>
	</entry>
	<entry>
		<id>https://ilianko.com/index.php?title=HTAP_(Hybrid_Transactional_and_Analytical_Processing)&amp;diff=6209</id>
		<title>HTAP (Hybrid Transactional and Analytical Processing)</title>
		<link rel="alternate" type="text/html" href="https://ilianko.com/index.php?title=HTAP_(Hybrid_Transactional_and_Analytical_Processing)&amp;diff=6209"/>
		<updated>2026-10-26T15:07:31Z</updated>

		<summary type="html">&lt;p&gt;Anko: Recreated DP-420 term page: HTAP (Hybrid Transactional and Analytical Processing) (Integration &amp;amp; Analytics)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;amp;larr; Back to [[DP-420: Azure Cosmos DB Developer Specialty|DP-420 Terminology Reference]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Category:&#039;&#039;&#039; Integration &amp;amp; Analytics&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Summary:&#039;&#039;&#039; Architecture running analytics over operational data without impacting transactional OLTP RUs, enabled via Synapse Link/analytical store.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
HTAP (Hybrid Transactional and Analytical Processing) is an architectural pattern that combines transactional processing (OLTP) and analytical processing (OLAP) on the same operational data in near real time, eliminating the latency, cost, and complexity of traditional Extract-Transform-Load (ETL) pipelines. In Azure Cosmos DB, HTAP is achieved through Azure Synapse Link and the analytical store — a separate, column-oriented storage layer that automatically and continuously syncs with the row-based transactional store with no impact on transactional Request Unit (RU) performance or cost. Enabling HTAP requires enabling analytical storage at the Azure Cosmos DB account level, and then configuring analytical storage Time-to-Live (TTL) when creating or updating containers.&lt;br /&gt;
&lt;br /&gt;
Example 1 (Azure CLI): Enable analytical storage (HTAP / Synapse Link) on the Cosmos DB account&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Enable analytical storage on an existing Cosmos DB account&lt;br /&gt;
az cosmosdb update     --name mycosmosaccount     --resource-group myRG     --enable-analytical-storage true&lt;br /&gt;
&lt;br /&gt;
# Alternatively, enable when creating a new Cosmos DB account&lt;br /&gt;
az cosmosdb create     --name mycosmosaccount     --resource-group myRG     --enable-analytical-storage true&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Enabling analytical storage at the account level is a prerequisite before any container within the account can enable its analytical store.&lt;br /&gt;
&lt;br /&gt;
Example 2 (Azure CLI): Create a container with analytical storage enabled&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Create a container with analytical store enabled and infinite retention (-1)&lt;br /&gt;
az cosmosdb sql container create     --account-name mycosmosaccount     --resource-group myRG     --database-name ecommerce     --name orders     --partition-key-path &amp;quot;/customerId&amp;quot;     --throughput 400     --analytical-storage-ttl -1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Setting &amp;lt;code&amp;gt;--analytical-storage-ttl -1&amp;lt;/code&amp;gt; enables the analytical store with no expiration (data is retained indefinitely, independent of the transactional store TTL).&lt;br /&gt;
&lt;br /&gt;
Example 3 (Azure CLI): Update analytical storage TTL on an existing container&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Update an existing container&#039;s analytical storage TTL (e.g. 90 days = 7776000 seconds)&lt;br /&gt;
az cosmosdb sql container update     --account-name mycosmosaccount     --resource-group myRG     --database-name ecommerce     --name orders     --analytical-storage-ttl 7776000&lt;br /&gt;
&lt;br /&gt;
# Disable analytical store on a container (set analytical-storage-ttl to 0)&lt;br /&gt;
az cosmosdb sql container update     --account-name mycosmosaccount     --resource-group myRG     --database-name ecommerce     --name orders     --analytical-storage-ttl 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Analytical storage TTL is completely separate from transactional TTL (&amp;lt;code&amp;gt;--ttl&amp;lt;/code&amp;gt;). Setting &amp;lt;code&amp;gt;--analytical-storage-ttl 0&amp;lt;/code&amp;gt; disables analytical sync and retention on the container.&lt;br /&gt;
&lt;br /&gt;
== More Info &amp;amp; Links ==&lt;br /&gt;
* [https://learn.microsoft.com/en-us/azure/cosmos-db/synapse-link Microsoft Learn: Azure Synapse Link for Azure Cosmos DB overview]&lt;br /&gt;
* [https://learn.microsoft.com/en-us/azure/cosmos-db/configure-synapse-link Microsoft Learn: Configure and use Azure Synapse Link for Azure Cosmos DB]&lt;br /&gt;
* [https://learn.microsoft.com/en-us/azure/cosmos-db/analytical-store-introduction#analytical-ttl Microsoft Learn: Analytical store Time-to-Live (TTL)]&lt;br /&gt;
&lt;br /&gt;
== DP-420 Style Practice Questions ==&lt;br /&gt;
&#039;&#039;&#039;Q1.&#039;&#039;&#039; What is the core benefit of HTAP (Hybrid Transactional and Analytical Processing) in Azure Cosmos DB?&lt;br /&gt;
* A. Running near real-time analytics over operational data without consuming transactional RUs or maintaining complex ETL pipelines&lt;br /&gt;
* B. Automatically partitioning transactional data across physical regions without partition keys&lt;br /&gt;
* C. Compressing JSON documents into XML format for client applications&lt;br /&gt;
* D. Restoring database accounts to any second within 30 days via self-service portal&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q2.&#039;&#039;&#039; Which Azure CLI command enables Synapse Link / HTAP analytical storage at the Cosmos DB account level?&lt;br /&gt;
* A. az cosmosdb update --name --resource-group --enable-analytical-storage true&lt;br /&gt;
* B. az cosmosdb sql container create --enable-htap true&lt;br /&gt;
* C. az cosmosdb throughput migrate --type analytical&lt;br /&gt;
* D. az cosmosdb sql database create --analytical-store on&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q3.&#039;&#039;&#039; How do you enable analytical storage on an Azure Cosmos DB container with indefinite retention using the Azure CLI?&lt;br /&gt;
* A. Specify --analytical-storage-ttl -1 when creating or updating the container using az cosmosdb sql container&lt;br /&gt;
* B. Specify --ttl -1 on the container&lt;br /&gt;
* C. Run az cosmosdb sql container throughput update --max-throughput 1000&lt;br /&gt;
* D. Add a composite index covering all paths in the indexing policy&lt;br /&gt;
&lt;br /&gt;
== Answer Key ==&lt;br /&gt;
&#039;&#039;Answers are listed at the very end so you can attempt the questions first.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Q1 (HTAP (Hybrid Transactional and Analytical Processing)):&#039;&#039;&#039; A. Running near real-time analytics over operational data without consuming transactional RUs or maintaining complex ETL pipelines — HTAP enables near real-time analytical workloads over the column-oriented analytical store while completely protecting operational OLTP performance and RU budget.&lt;br /&gt;
* &#039;&#039;&#039;Q2 (HTAP (Hybrid Transactional and Analytical Processing)):&#039;&#039;&#039; A. az cosmosdb update --name --resource-group --enable-analytical-storage true — Enabling analytical storage at the account level requires &#039;az cosmosdb update (or create) --enable-analytical-storage true&#039;.&lt;br /&gt;
* &#039;&#039;&#039;Q3 (HTAP (Hybrid Transactional and Analytical Processing)):&#039;&#039;&#039; A. Specify --analytical-storage-ttl -1 when creating or updating the container using az cosmosdb sql container — --analytical-storage-ttl controls the analytical store&#039;s retention; -1 means retain analytical data forever, independent of transactional TTL (--ttl).&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;DP-420: Designing and Implementing Cloud-Native Applications Using Microsoft Azure Cosmos DB — term detail page&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[Category:DP-420 Terminology]]&lt;br /&gt;
[[Category:Integration &amp;amp; Analytics]]&lt;/div&gt;</summary>
		<author><name>Anko</name></author>
	</entry>
	<entry>
		<id>https://ilianko.com/index.php?title=Full-Text_Query&amp;diff=6208</id>
		<title>Full-Text Query</title>
		<link rel="alternate" type="text/html" href="https://ilianko.com/index.php?title=Full-Text_Query&amp;diff=6208"/>
		<updated>2026-10-26T15:07:30Z</updated>

		<summary type="html">&lt;p&gt;Anko: Recreated DP-420 term page: Full-Text Query (Integration &amp;amp; Analytics)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;amp;larr; Back to [[DP-420: Azure Cosmos DB Developer Specialty|DP-420 Terminology Reference]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Category:&#039;&#039;&#039; Integration &amp;amp; Analytics&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Summary:&#039;&#039;&#039; Native keyword search via FULLTEXTCONTAINS/FULLTEXTSCORE, backed by a full-text index.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
A full-text query is Azure Cosmos DB for NoSQL&#039;s native capability to search text properties directly using functions such as FULLTEXTCONTAINS and FULLTEXTSCORE (BM25 relevance ranking), backed by a full-text index defined in the container&#039;s indexing policy — without requiring a separate search service. It can also be combined with vector search results using reciprocal rank fusion (RRF) for hybrid search, offering a lighter-weight alternative to integrating a dedicated Azure AI Search Integration when only basic keyword relevance search is needed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
using Microsoft.Azure.Cosmos;&lt;br /&gt;
&lt;br /&gt;
string endpoint = &amp;quot;&amp;quot;;&lt;br /&gt;
string key = &amp;quot;&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
using CosmosClient client = new(endpoint, key);&lt;br /&gt;
&lt;br /&gt;
Database database = await client.CreateDatabaseIfNotExistsAsync(&lt;br /&gt;
    id: &amp;quot;catalog-db&amp;quot;&lt;br /&gt;
);&lt;br /&gt;
&lt;br /&gt;
// Define the container&lt;br /&gt;
ContainerProperties containerProperties = new()&lt;br /&gt;
{&lt;br /&gt;
    Id = &amp;quot;products&amp;quot;,&lt;br /&gt;
&lt;br /&gt;
    // Partition key&lt;br /&gt;
    PartitionKeyPath = &amp;quot;/category&amp;quot;,&lt;br /&gt;
&lt;br /&gt;
    // Optional: automatically expire items after 30 days&lt;br /&gt;
    DefaultTimeToLive = 60 * 60 * 24 * 30,&lt;br /&gt;
&lt;br /&gt;
    // Declare which properties contain searchable text&lt;br /&gt;
    FullTextPolicy = new FullTextPolicy&lt;br /&gt;
    {&lt;br /&gt;
        DefaultLanguage = &amp;quot;en-US&amp;quot;,&lt;br /&gt;
&lt;br /&gt;
        FullTextPaths =&lt;br /&gt;
        {&lt;br /&gt;
            new FullTextPath&lt;br /&gt;
            {&lt;br /&gt;
                Path = &amp;quot;/name&amp;quot;,&lt;br /&gt;
                Language = &amp;quot;en-US&amp;quot;&lt;br /&gt;
            },&lt;br /&gt;
            new FullTextPath&lt;br /&gt;
            {&lt;br /&gt;
                Path = &amp;quot;/description&amp;quot;,&lt;br /&gt;
                Language = &amp;quot;en-US&amp;quot;&lt;br /&gt;
            }&lt;br /&gt;
        }&lt;br /&gt;
    },&lt;br /&gt;
&lt;br /&gt;
    // Configure all indexes for the container&lt;br /&gt;
    IndexingPolicy = new IndexingPolicy&lt;br /&gt;
    {&lt;br /&gt;
        IndexingMode = IndexingMode.Consistent,&lt;br /&gt;
        Automatic = true,&lt;br /&gt;
&lt;br /&gt;
        IncludedPaths =&lt;br /&gt;
        {&lt;br /&gt;
            new IncludedPath&lt;br /&gt;
            {&lt;br /&gt;
                Path = &amp;quot;/*&amp;quot;&lt;br /&gt;
            }&lt;br /&gt;
        },&lt;br /&gt;
&lt;br /&gt;
        // Do not use the regular range index for this property&lt;br /&gt;
        ExcludedPaths =&lt;br /&gt;
        {&lt;br /&gt;
            new ExcludedPath&lt;br /&gt;
            {&lt;br /&gt;
                Path = &amp;quot;/largeMetadata/*&amp;quot;&lt;br /&gt;
            }&lt;br /&gt;
        },&lt;br /&gt;
&lt;br /&gt;
        // Composite index:&lt;br /&gt;
        //&lt;br /&gt;
        // SELECT *&lt;br /&gt;
        // FROM c&lt;br /&gt;
        // WHERE c.category = &amp;quot;laptops&amp;quot;&lt;br /&gt;
        // ORDER BY c.price DESC&lt;br /&gt;
        CompositeIndexes =&lt;br /&gt;
        {&lt;br /&gt;
            new Collection&lt;br /&gt;
            {&lt;br /&gt;
                new CompositePath&lt;br /&gt;
                {&lt;br /&gt;
                    Path = &amp;quot;/category&amp;quot;,&lt;br /&gt;
                    Order = CompositePathSortOrder.Ascending&lt;br /&gt;
                },&lt;br /&gt;
                new CompositePath&lt;br /&gt;
                {&lt;br /&gt;
                    Path = &amp;quot;/price&amp;quot;,&lt;br /&gt;
                    Order = CompositePathSortOrder.Descending&lt;br /&gt;
                }&lt;br /&gt;
            }&lt;br /&gt;
        },&lt;br /&gt;
&lt;br /&gt;
        // Specialized full-text indexes&lt;br /&gt;
        FullTextIndexes =&lt;br /&gt;
        {&lt;br /&gt;
            new FullTextIndexPath&lt;br /&gt;
            {&lt;br /&gt;
                Path = &amp;quot;/name&amp;quot;&lt;br /&gt;
            },&lt;br /&gt;
            new FullTextIndexPath&lt;br /&gt;
            {&lt;br /&gt;
                Path = &amp;quot;/description&amp;quot;&lt;br /&gt;
            }&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
// Create the container with 400 provisioned RU/s&lt;br /&gt;
ContainerResponse response =&lt;br /&gt;
    await database.CreateContainerIfNotExistsAsync(&lt;br /&gt;
        containerProperties: containerProperties,&lt;br /&gt;
        throughput: 400&lt;br /&gt;
    );&lt;br /&gt;
&lt;br /&gt;
Container container = response.Container;&lt;br /&gt;
&lt;br /&gt;
Console.WriteLine(&lt;br /&gt;
    $&amp;quot;Container &#039;{container.Id}&#039; is ready. &amp;quot; +&lt;br /&gt;
    $&amp;quot;Status: {response.StatusCode}&amp;quot;&lt;br /&gt;
);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// Create a container with only full-text indexing&lt;br /&gt;
ContainerProperties containerProperties = new()&lt;br /&gt;
{&lt;br /&gt;
    Id = &amp;quot;text-only&amp;quot;,&lt;br /&gt;
    PartitionKeyPath = &amp;quot;/id&amp;quot;,&lt;br /&gt;
&lt;br /&gt;
    // Only define full-text indexes&lt;br /&gt;
    IndexingPolicy = new IndexingPolicy&lt;br /&gt;
    {&lt;br /&gt;
        IndexingMode = IndexingMode.Consistent,&lt;br /&gt;
        Automatic = true,&lt;br /&gt;
&lt;br /&gt;
        // Only full-text indexes&lt;br /&gt;
        FullTextIndexes =&lt;br /&gt;
        {&lt;br /&gt;
            new FullTextIndexPath&lt;br /&gt;
            {&lt;br /&gt;
                Path = &amp;quot;/title&amp;quot;&lt;br /&gt;
            },&lt;br /&gt;
            new FullTextIndexPath&lt;br /&gt;
            {&lt;br /&gt;
                Path = &amp;quot;/abstract&amp;quot;&lt;br /&gt;
            }&lt;br /&gt;
        },&lt;br /&gt;
&lt;br /&gt;
        // No range or composite indexes&lt;br /&gt;
        IncludedPaths = { },&lt;br /&gt;
        ExcludedPaths = { }&lt;br /&gt;
    }&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &lt;br /&gt;
    var queryable = container.GetItemLinqQueryable(&lt;br /&gt;
        queryText: &amp;quot;SELECT * FROM c WHERE FULLTEXTCONTAINS(c.description, @search)&amp;quot;,&lt;br /&gt;
        parameters: new[]&lt;br /&gt;
        {&lt;br /&gt;
            new SqlParameter(&amp;quot;@search&amp;quot;, &amp;quot;high-performance laptop&amp;quot;)&lt;br /&gt;
        }&lt;br /&gt;
    );&lt;br /&gt;
&lt;br /&gt;
    foreach (Product product in queryable)&lt;br /&gt;
    {&lt;br /&gt;
        Console.WriteLine($&amp;quot;Name: {product.Name}&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== More Info &amp;amp; Links ==&lt;br /&gt;
* [https://learn.microsoft.com/en-us/azure/cosmos-db/nosql/full-text-search Microsoft Learn: Full-text search in Azure Cosmos DB for NoSQL]&lt;br /&gt;
&lt;br /&gt;
== DP-420 Style Practice Questions ==&lt;br /&gt;
&#039;&#039;&#039;Q1.&#039;&#039;&#039; What enables full-text query capability in Azure Cosmos DB for NoSQL?&lt;br /&gt;
* A. A full-text index defined in the container&#039;s indexing policy, queried with functions like FULLTEXTCONTAINS/FULLTEXTSCORE&lt;br /&gt;
* B. A separate Azure AI Search resource that must always be provisioned&lt;br /&gt;
* C. The default range index applied to every property&lt;br /&gt;
* D. The change feed processor&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q2.&#039;&#039;&#039; When might you choose Azure Cosmos DB&#039;s native full-text query over integrating Azure AI Search?&lt;br /&gt;
* A. When you need lightweight keyword relevance ranking without provisioning and maintaining a separate search service&lt;br /&gt;
* B. When you require a dedicated analytical store&lt;br /&gt;
* C. When you need multi-region write support&lt;br /&gt;
* D. When you need to enforce a composite index&lt;br /&gt;
&lt;br /&gt;
== Answer Key ==&lt;br /&gt;
&#039;&#039;Answers are listed at the very end so you can attempt the questions first.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Q1 (Full-Text Query):&#039;&#039;&#039; A. A full-text index defined in the container&#039;s indexing policy, queried with functions like FULLTEXTCONTAINS/FULLTEXTSCORE — Full-text query is a native Cosmos DB capability driven by a full-text index and query functions like FULLTEXTCONTAINS and FULLTEXTSCORE.&lt;br /&gt;
* &#039;&#039;&#039;Q2 (Full-Text Query):&#039;&#039;&#039; A. When you need lightweight keyword relevance ranking without provisioning and maintaining a separate search service — Native full-text query avoids the cost/complexity of a separate Azure AI Search service for basic BM25-style keyword relevance search.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;DP-420: Designing and Implementing Cloud-Native Applications Using Microsoft Azure Cosmos DB — term detail page&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[Category:DP-420 Terminology]]&lt;br /&gt;
[[Category:Integration &amp;amp; Analytics]]&lt;/div&gt;</summary>
		<author><name>Anko</name></author>
	</entry>
	<entry>
		<id>https://ilianko.com/index.php?title=Change_Feed&amp;diff=6207</id>
		<title>Change Feed</title>
		<link rel="alternate" type="text/html" href="https://ilianko.com/index.php?title=Change_Feed&amp;diff=6207"/>
		<updated>2026-10-26T15:07:30Z</updated>

		<summary type="html">&lt;p&gt;Anko: Recreated DP-420 term page: Change Feed (Integration &amp;amp; Analytics)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;amp;larr; Back to [[DP-420: Azure Cosmos DB Developer Specialty|DP-420 Terminology Reference]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Category:&#039;&#039;&#039; Integration &amp;amp; Analytics&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Summary:&#039;&#039;&#039; Persistent, ordered log of item inserts/updates, consumable by apps and Azure Functions.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
The change feed is a persistent, ordered log of changes (inserts and updates) made to items within an Azure Cosmos DB container, available for consumption by applications, Azure Functions, or other Azure services. It is a foundational building block for scenarios such as event-driven architectures, real-time analytics, denormalization, referential integrity enforcement, aggregation, and data archiving.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Container monitoredContainer =&lt;br /&gt;
    database.GetContainer(&amp;quot;Orders&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
Container leaseContainer =&lt;br /&gt;
    database.GetContainer(&amp;quot;Leases&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
ChangeFeedProcessor processor =&lt;br /&gt;
    monitoredContainer&lt;br /&gt;
        .GetChangeFeedProcessorBuilder(&lt;br /&gt;
            processorName: &amp;quot;orders-processor&amp;quot;,&lt;br /&gt;
            onChangesDelegate: HandleChangesAsync)&lt;br /&gt;
        .WithLeaseContainer(leaseContainer)&lt;br /&gt;
        .Build();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== More Info &amp;amp; Links ==&lt;br /&gt;
* [https://learn.microsoft.com/en-us/azure/cosmos-db/nosql/change-feed Microsoft Learn: Change feed in Azure Cosmos DB]&lt;br /&gt;
&lt;br /&gt;
== DP-420 Style Practice Questions ==&lt;br /&gt;
&#039;&#039;&#039;Q1.&#039;&#039;&#039; What does the Azure Cosmos DB change feed provide?&lt;br /&gt;
* A. A persistent, ordered log of insert/update operations on container items&lt;br /&gt;
* B. A one-time export of all data in a container&lt;br /&gt;
* C. A record of only delete operations&lt;br /&gt;
* D. A backup of the entire database account&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q2.&#039;&#039;&#039; Which of these is a common use case for the change feed?&lt;br /&gt;
* A. Denormalizing data or enforcing referential integrity via Azure Functions&lt;br /&gt;
* B. Defining the container&#039;s partition key&lt;br /&gt;
* C. Encrypting data at rest&lt;br /&gt;
* D. Configuring the consistency level&lt;br /&gt;
&lt;br /&gt;
== Answer Key ==&lt;br /&gt;
&#039;&#039;Answers are listed at the very end so you can attempt the questions first.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Q1 (Change Feed):&#039;&#039;&#039; A. A persistent, ordered log of insert/update operations on container items — The change feed captures inserts and updates (not deletes, by default) as an ordered, persistent log for downstream consumption.&lt;br /&gt;
* &#039;&#039;&#039;Q2 (Change Feed):&#039;&#039;&#039; A. Denormalizing data or enforcing referential integrity via Azure Functions — Change feed + Azure Functions is commonly used for denormalization, referential integrity, aggregation, and archiving.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;DP-420: Designing and Implementing Cloud-Native Applications Using Microsoft Azure Cosmos DB — term detail page&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[Category:DP-420 Terminology]]&lt;br /&gt;
[[Category:Integration &amp;amp; Analytics]]&lt;/div&gt;</summary>
		<author><name>Anko</name></author>
	</entry>
	<entry>
		<id>https://ilianko.com/index.php?title=EXISTS_%26_Array_Functions_(IS_ARRAY,_ARRAY_CONTAINS)&amp;diff=6206</id>
		<title>EXISTS &amp; Array Functions (IS ARRAY, ARRAY CONTAINS)</title>
		<link rel="alternate" type="text/html" href="https://ilianko.com/index.php?title=EXISTS_%26_Array_Functions_(IS_ARRAY,_ARRAY_CONTAINS)&amp;diff=6206"/>
		<updated>2026-10-26T15:07:30Z</updated>

		<summary type="html">&lt;p&gt;Anko: Recreated DP-420 term page: EXISTS &amp;amp; Array Functions (IS_ARRAY, ARRAY_CONTAINS) (Server-Side Programming)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;amp;larr; Back to [[DP-420: Azure Cosmos DB Developer Specialty|DP-420 Terminology Reference]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Category:&#039;&#039;&#039; Server-Side Programming&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Summary:&#039;&#039;&#039; SQL subquery and array functions (EXISTS, IS_ARRAY, ARRAY_CONTAINS, ARRAY_LENGTH) for nested data.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
Azure Cosmos DB for NoSQL provides powerful query operators and built-in system functions for filtering, inspecting, and manipulating JSON arrays and variable-schema documents: &#039;&#039;&#039;1. EXISTS (Subquery Expression):&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* A boolean operator that evaluates a subquery and returns &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; if the subquery returns at least one item, and &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; otherwise.&lt;br /&gt;
* &#039;&#039;&#039;EXISTS vs. JOIN:&#039;&#039;&#039; An intra-document &amp;lt;code&amp;gt;JOIN&amp;lt;/code&amp;gt; on an array duplicates the parent document in the result set for every matching array element. In contrast, &amp;lt;code&amp;gt;WHERE EXISTS (...)&amp;lt;/code&amp;gt; evaluates nested array criteria (using &amp;lt;code&amp;gt;c IN f.arrayProperty&amp;lt;/code&amp;gt;) and returns each qualifying parent document &#039;&#039;exactly once&#039;&#039; without result duplication.&lt;br /&gt;
* &#039;&#039;&#039;Negation (NOT EXISTS):&#039;&#039;&#039; Filters for parent documents where no child array elements satisfy the subquery condition.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. Built-In Array System Functions:&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;ARRAY_CONTAINS(arr, expr [, bool_expr]):&#039;&#039;&#039; Checks whether an array contains a specific value. When searching for partial JSON objects, passing &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; as the optional third parameter enables partial/sub-object matching.&lt;br /&gt;
* &#039;&#039;&#039;ARRAY_LENGTH(arr):&#039;&#039;&#039; Returns the number of elements in the specified array.&lt;br /&gt;
* &#039;&#039;&#039;ARRAY_CONCAT(arr1, arr2 [, ...]):&#039;&#039;&#039; Concatenates two or more arrays into a single combined array.&lt;br /&gt;
* &#039;&#039;&#039;ARRAY_SLICE(arr, start_index [, length]):&#039;&#039;&#039; Returns a subset (slice) of an array starting at the zero-based index.&lt;br /&gt;
* &#039;&#039;&#039;ARRAY(subquery):&#039;&#039;&#039; Converts the output of a subquery into a JSON array within the projection.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;3. Type Checking &amp;amp; Guard Functions:&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;IS_ARRAY(expr):&#039;&#039;&#039; Returns &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; if the expression is a JSON array. Essential for guarding queries against documents with missing or non-array values.&lt;br /&gt;
* &#039;&#039;&#039;IS_OBJECT(expr):&#039;&#039;&#039; Returns &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; if the expression is a JSON object.&lt;br /&gt;
* &#039;&#039;&#039;IS_DEFINED(expr):&#039;&#039;&#039; Returns &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; if the property exists and is defined (not missing or undefined).&lt;br /&gt;
* &#039;&#039;&#039;IS_NULL(expr):&#039;&#039;&#039; Returns &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; if the property value is explicitly &amp;lt;code&amp;gt;null&amp;lt;/code&amp;gt;.&lt;br /&gt;
* &#039;&#039;&#039;IS_PRIMITIVE(expr):&#039;&#039;&#039; Returns &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; if the value is a scalar type (string, number, boolean, or null).&lt;br /&gt;
* &#039;&#039;&#039;IS_STRING / IS_NUMBER / IS_BOOL:&#039;&#039;&#039; Type checking for specific scalar types.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example 1 (Cosmos DB SQL): Filter parents where a nested child has multiple pets (EXISTS with ARRAY_LENGTH)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-- Returns family IDs where at least one child in the children array has more than 1 pet&lt;br /&gt;
SELECT f.id &lt;br /&gt;
FROM f &lt;br /&gt;
WHERE EXISTS (&lt;br /&gt;
    SELECT VALUE c &lt;br /&gt;
    FROM c IN f.children &lt;br /&gt;
    WHERE ARRAY_LENGTH(c.pets) &amp;amp;gt; 1&lt;br /&gt;
)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using &amp;lt;code&amp;gt;EXISTS&amp;lt;/code&amp;gt; returns each qualifying family document exactly once without cartesian product row duplication.&lt;br /&gt;
&lt;br /&gt;
Example 2 (Cosmos DB SQL): ARRAY_CONTAINS (Scalar &amp;amp; Partial Object Matching) vs. EXISTS&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-- 1. Simple scalar check with ARRAY_CONTAINS (fast &amp;amp;amp; concise)&lt;br /&gt;
SELECT p.id, p.name &lt;br /&gt;
FROM p &lt;br /&gt;
WHERE ARRAY_CONTAINS(p.tags, &amp;quot;Sale&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
-- 2. Partial object matching with ARRAY_CONTAINS (3rd argument = true)&lt;br /&gt;
SELECT f.id &lt;br /&gt;
FROM f &lt;br /&gt;
WHERE ARRAY_CONTAINS(f.children, { &amp;quot;gender&amp;quot;: &amp;quot;female&amp;quot; }, true)&lt;br /&gt;
&lt;br /&gt;
-- 3. Complex multi-condition check with EXISTS (predicates that ARRAY_CONTAINS cannot express)&lt;br /&gt;
SELECT f.id &lt;br /&gt;
FROM f &lt;br /&gt;
WHERE EXISTS (&lt;br /&gt;
    SELECT VALUE c &lt;br /&gt;
    FROM c IN f.children &lt;br /&gt;
    WHERE c.gender = &amp;quot;female&amp;quot; AND c.grade &amp;amp;gt;= 10&lt;br /&gt;
)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example 3 (Cosmos DB SQL): Guarding Schema-Agnostic Queries with IS_ARRAY &amp;amp; IS_DEFINED&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-- Safely query items where &#039;tags&#039; is defined, is a valid array, has items, and contains &#039;Azure&#039;&lt;br /&gt;
SELECT c.id, c.title&lt;br /&gt;
FROM c&lt;br /&gt;
WHERE IS_DEFINED(c.tags) &lt;br /&gt;
  AND IS_ARRAY(c.tags) &lt;br /&gt;
  AND ARRAY_LENGTH(c.tags) &amp;amp;gt; 0&lt;br /&gt;
  AND ARRAY_CONTAINS(c.tags, &amp;quot;Azure&amp;quot;)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example 4 (Cosmos DB SQL): Array Manipulation with ARRAY_SLICE and ARRAY_CONCAT&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-- Slices top 2 tags and concatenates primary &amp;amp;amp; secondary color arrays&lt;br /&gt;
SELECT &lt;br /&gt;
    p.id,&lt;br /&gt;
    ARRAY_SLICE(p.tags, 0, 2) AS TopTags,&lt;br /&gt;
    ARRAY_CONCAT(p.primaryColors, p.secondaryColors) AS AllColors&lt;br /&gt;
FROM p&lt;br /&gt;
WHERE IS_ARRAY(p.tags) AND IS_ARRAY(p.primaryColors)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== More Info &amp;amp; Links ==&lt;br /&gt;
* [https://learn.microsoft.com/en-us/azure/cosmos-db/nosql/query/subqueries#exists-expression Microsoft Learn: Subqueries in Azure Cosmos DB (EXISTS expression)]&lt;br /&gt;
* [https://learn.microsoft.com/en-us/azure/cosmos-db/nosql/query/array-contains Microsoft Learn: ARRAY_CONTAINS in Azure Cosmos DB]&lt;br /&gt;
* [https://learn.microsoft.com/en-us/azure/cosmos-db/nosql/query/is-array Microsoft Learn: IS_ARRAY in Azure Cosmos DB]&lt;br /&gt;
* [https://learn.microsoft.com/en-us/azure/cosmos-db/nosql/query/array-functions Microsoft Learn: Array functions in Azure Cosmos DB]&lt;br /&gt;
* [https://learn.microsoft.com/en-us/azure/cosmos-db/nosql/query/type-checking-functions Microsoft Learn: Type checking functions in Azure Cosmos DB]&lt;br /&gt;
* [https://learn.microsoft.com/en-us/credentials/certifications/resources/study-guides/dp-420 Microsoft Learn: DP-420 study guide]&lt;br /&gt;
&lt;br /&gt;
== DP-420 Style Practice Questions ==&lt;br /&gt;
&#039;&#039;&#039;Q1.&#039;&#039;&#039; What is the primary advantage of using WHERE EXISTS (subquery) instead of a JOIN when filtering documents based on nested array properties?&lt;br /&gt;
* A. It returns each qualifying parent document exactly once without duplicating rows for multiple matching array elements&lt;br /&gt;
* B. It enables multi-region write replication on the container&lt;br /&gt;
* C. It automatically creates a spatial index over the nested array&lt;br /&gt;
* D. It allows modifying the nested array elements in place&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q2.&#039;&#039;&#039; When should you choose EXISTS (subquery) over ARRAY_CONTAINS when querying nested array data?&lt;br /&gt;
* A. When you need to evaluate complex expressions, multiple properties, or range conditions (such as ARRAY_LENGTH(c.pets) &amp;gt; 1) on array elements&lt;br /&gt;
* B. When checking if a flat array contains a simple scalar string value&lt;br /&gt;
* C. When you need to order documents by their partition key&lt;br /&gt;
* D. When the container uses gateway mode exclusively&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q3.&#039;&#039;&#039; Which Azure Cosmos DB SQL system function checks whether a property exists and is of JSON array type before executing array operations?&lt;br /&gt;
* A. IS_ARRAY(c.property)&lt;br /&gt;
* B. TYPE_OF(c.property) == &#039;Array&#039;&lt;br /&gt;
* C. IS_LIST(c.property)&lt;br /&gt;
* D. CHECK_ARRAY(c.property)&lt;br /&gt;
&lt;br /&gt;
== Answer Key ==&lt;br /&gt;
&#039;&#039;Answers are listed at the very end so you can attempt the questions first.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Q1 (EXISTS &amp;amp; Array Functions (IS_ARRAY, ARRAY_CONTAINS)):&#039;&#039;&#039; A. It returns each qualifying parent document exactly once without duplicating rows for multiple matching array elements — WHERE EXISTS evaluates whether at least one matching element exists and returns the parent document without duplicating it, unlike JOIN which produces cartesian product duplicates.&lt;br /&gt;
* &#039;&#039;&#039;Q2 (EXISTS &amp;amp; Array Functions (IS_ARRAY, ARRAY_CONTAINS)):&#039;&#039;&#039; A. When you need to evaluate complex expressions, multiple properties, or range conditions (such as ARRAY_LENGTH(c.pets) &amp;gt; 1) on array elements — ARRAY_CONTAINS is ideal for simple scalar containment or partial object equality, whereas EXISTS with a subquery is required for complex multi-condition predicates and range evaluations on array items.&lt;br /&gt;
* &#039;&#039;&#039;Q3 (EXISTS &amp;amp; Array Functions (IS_ARRAY, ARRAY_CONTAINS)):&#039;&#039;&#039; A. IS_ARRAY(c.property) — IS_ARRAY returns a boolean indicating whether the target expression is a JSON array, preventing query errors across heterogeneous document schemas.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;DP-420: Designing and Implementing Cloud-Native Applications Using Microsoft Azure Cosmos DB — term detail page&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[Category:DP-420 Terminology]]&lt;br /&gt;
[[Category:Server-Side Programming]]&lt;/div&gt;</summary>
		<author><name>Anko</name></author>
	</entry>
	<entry>
		<id>https://ilianko.com/index.php?title=Aggregate_Functions_(COUNT,_SUM,_AVG,_MIN,_MAX)&amp;diff=6205</id>
		<title>Aggregate Functions (COUNT, SUM, AVG, MIN, MAX)</title>
		<link rel="alternate" type="text/html" href="https://ilianko.com/index.php?title=Aggregate_Functions_(COUNT,_SUM,_AVG,_MIN,_MAX)&amp;diff=6205"/>
		<updated>2026-10-26T15:07:29Z</updated>

		<summary type="html">&lt;p&gt;Anko: Recreated DP-420 term page: Aggregate Functions (COUNT, SUM, AVG, MIN, MAX) (Server-Side Programming)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;amp;larr; Back to [[DP-420: Azure Cosmos DB Developer Specialty|DP-420 Terminology Reference]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Category:&#039;&#039;&#039; Server-Side Programming&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Summary:&#039;&#039;&#039; Built-in SQL aggregate operators (COUNT, SUM, AVG, MIN, MAX) used with GROUP BY.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
Azure Cosmos DB for NoSQL supports standard built-in aggregate functions in SQL queries, typically paired with the &amp;lt;code&amp;gt;GROUP BY&amp;lt;/code&amp;gt; clause to summarize and group items across partitions:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;COUNT&#039;&#039;&#039;: Returns the number of items in the group (e.g., &amp;lt;code&amp;gt;COUNT(1)&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;COUNT(*)&amp;lt;/code&amp;gt; to count all items, or &amp;lt;code&amp;gt;COUNT(c.property)&amp;lt;/code&amp;gt; to count items where the property is defined and not null).&lt;br /&gt;
* &#039;&#039;&#039;SUM&#039;&#039;&#039;: Returns the arithmetic sum of numeric values in the expression across the group (ignores non-numeric and undefined values).&lt;br /&gt;
* &#039;&#039;&#039;AVG&#039;&#039;&#039;: Returns the arithmetic average (mean) of numeric values in the expression across the group.&lt;br /&gt;
* &#039;&#039;&#039;MIN&#039;&#039;&#039;: Returns the minimum scalar value (numeric, string, boolean, etc.) in the expression across the group.&lt;br /&gt;
* &#039;&#039;&#039;MAX&#039;&#039;&#039;: Returns the maximum scalar value (numeric, string, boolean, etc.) in the expression across the group.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Key DP-420 Rules &amp;amp; Behaviors:&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;GROUP BY Rule:&#039;&#039;&#039; Any property projected in the &amp;lt;code&amp;gt;SELECT&amp;lt;/code&amp;gt; clause that is not wrapped inside an aggregate function MUST be explicitly included in the &amp;lt;code&amp;gt;GROUP BY&amp;lt;/code&amp;gt; clause.&lt;br /&gt;
* &#039;&#039;&#039;Exact Function Names:&#039;&#039;&#039; Only &amp;lt;code&amp;gt;COUNT&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;SUM&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;AVG&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MIN&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;MAX&amp;lt;/code&amp;gt; are supported out of the box in the NoSQL query language. Functions such as &amp;lt;code&amp;gt;MEDIAN&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;STDEV&amp;lt;/code&amp;gt;, or &amp;lt;code&amp;gt;VAR&amp;lt;/code&amp;gt; are NOT natively supported.&lt;br /&gt;
* &#039;&#039;&#039;VALUE Keyword:&#039;&#039;&#039; You can use &amp;lt;code&amp;gt;SELECT VALUE COUNT(1) FROM c&amp;lt;/code&amp;gt; to project a single scalar value rather than a JSON object.&lt;br /&gt;
* &#039;&#039;&#039;Performance &amp;amp; Indexing:&#039;&#039;&#039; Queries with &amp;lt;code&amp;gt;GROUP BY&amp;lt;/code&amp;gt; and aggregate functions benefit significantly from composite indexes on the grouped/filtered properties and execute efficient per-partition aggregations that the query engine merges.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example 1 (Cosmos DB SQL): Comprehensive GROUP BY with all 5 standard aggregate functions&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-- Groups products by category and calculates count, sum, average, min, and max price&lt;br /&gt;
SELECT &lt;br /&gt;
    c.category,&lt;br /&gt;
    COUNT(1) AS TotalProducts,&lt;br /&gt;
    SUM(c.price) AS TotalInventoryValue,&lt;br /&gt;
    AVG(c.price) AS AveragePrice,&lt;br /&gt;
    MIN(c.price) AS LowestPrice,&lt;br /&gt;
    MAX(c.price) AS HighestPrice&lt;br /&gt;
FROM c&lt;br /&gt;
WHERE c.isAvailable = true&lt;br /&gt;
GROUP BY c.category&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Every scalar property in the &amp;lt;code&amp;gt;SELECT&amp;lt;/code&amp;gt; list (&amp;lt;code&amp;gt;c.category&amp;lt;/code&amp;gt;) is present in the &amp;lt;code&amp;gt;GROUP BY&amp;lt;/code&amp;gt; clause, and all 5 standard aggregates are computed per group.&lt;br /&gt;
&lt;br /&gt;
Example 2 (Cosmos DB SQL): Multi-Property GROUP BY with WHERE and ORDER BY&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-- Groups items by multiple properties (manufacturer and category) with an average rating&lt;br /&gt;
SELECT &lt;br /&gt;
    c.manufacturer,&lt;br /&gt;
    c.category,&lt;br /&gt;
    COUNT(1) AS ItemCount,&lt;br /&gt;
    AVG(c.rating) AS AverageRating,&lt;br /&gt;
    SUM(c.inventoryCount) AS TotalInventory&lt;br /&gt;
FROM c&lt;br /&gt;
WHERE c.discontinued = false&lt;br /&gt;
GROUP BY c.manufacturer, c.category&lt;br /&gt;
ORDER BY c.manufacturer ASC&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example 3 (Cosmos DB SQL): Scalar Aggregate with the VALUE keyword (No GROUP BY)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-- Returns a raw scalar number (e.g. 42) instead of a JSON object ({&amp;quot;$1&amp;quot;: 42})&lt;br /&gt;
SELECT VALUE COUNT(1)&lt;br /&gt;
FROM c&lt;br /&gt;
WHERE c.status = &amp;quot;Pending&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== More Info &amp;amp; Links ==&lt;br /&gt;
* [https://learn.microsoft.com/en-us/azure/cosmos-db/nosql/query/aggregate-functions Microsoft Learn: Aggregate functions in Azure Cosmos DB SQL query language]&lt;br /&gt;
* [https://learn.microsoft.com/en-us/azure/cosmos-db/nosql/query/group-by Microsoft Learn: GROUP BY clause in Azure Cosmos DB]&lt;br /&gt;
* [https://learn.microsoft.com/en-us/credentials/certifications/resources/study-guides/dp-420 Microsoft Learn: DP-420 study guide]&lt;br /&gt;
&lt;br /&gt;
== DP-420 Style Practice Questions ==&lt;br /&gt;
&#039;&#039;&#039;Q1.&#039;&#039;&#039; Which set of aggregate functions is natively supported in Azure Cosmos DB for NoSQL with the GROUP BY clause?&lt;br /&gt;
* A. COUNT, SUM, AVG, MIN, and MAX&lt;br /&gt;
* B. COUNT, MEDIAN, STDEV, VAR, and MODE&lt;br /&gt;
* C. SUM, AVERAGE, MINIMUM, MAXIMUM, and TOTAL&lt;br /&gt;
* D. COUNT, FIRST, LAST, SUM, and AGGREGATE&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q2.&#039;&#039;&#039; When executing a SQL query with GROUP BY in Azure Cosmos DB, what is required for properties in the SELECT projection?&lt;br /&gt;
* A. Any scalar property in the SELECT list that is not wrapped in an aggregate function must appear in the GROUP BY clause&lt;br /&gt;
* B. The query can only project a single aggregate function with no category or group keys&lt;br /&gt;
* C. The container&#039;s partition key must always be the first item in the GROUP BY list&lt;br /&gt;
* D. Aliasing with the AS keyword is prohibited when using GROUP BY&lt;br /&gt;
&lt;br /&gt;
== Answer Key ==&lt;br /&gt;
&#039;&#039;Answers are listed at the very end so you can attempt the questions first.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Q1 (Aggregate Functions (COUNT, SUM, AVG, MIN, MAX)):&#039;&#039;&#039; A. COUNT, SUM, AVG, MIN, and MAX — Azure Cosmos DB for NoSQL supports five exact built-in aggregate functions: COUNT, SUM, AVG, MIN, and MAX. Other statistical functions like MEDIAN or STDEV are not natively built-in.&lt;br /&gt;
* &#039;&#039;&#039;Q2 (Aggregate Functions (COUNT, SUM, AVG, MIN, MAX)):&#039;&#039;&#039; A. Any scalar property in the SELECT list that is not wrapped in an aggregate function must appear in the GROUP BY clause — In Azure Cosmos DB SQL, any non-aggregate property in the SELECT clause must be explicitly declared in the GROUP BY clause.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;DP-420: Designing and Implementing Cloud-Native Applications Using Microsoft Azure Cosmos DB — term detail page&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[Category:DP-420 Terminology]]&lt;br /&gt;
[[Category:Server-Side Programming]]&lt;/div&gt;</summary>
		<author><name>Anko</name></author>
	</entry>
	<entry>
		<id>https://ilianko.com/index.php?title=User-Defined_Function_(UDF)&amp;diff=6204</id>
		<title>User-Defined Function (UDF)</title>
		<link rel="alternate" type="text/html" href="https://ilianko.com/index.php?title=User-Defined_Function_(UDF)&amp;diff=6204"/>
		<updated>2026-10-26T15:07:29Z</updated>

		<summary type="html">&lt;p&gt;Anko: Recreated DP-420 term page: User-Defined Function (UDF) (Server-Side Programming)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;amp;larr; Back to [[DP-420: Azure Cosmos DB Developer Specialty|DP-420 Terminology Reference]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Category:&#039;&#039;&#039; Server-Side Programming&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Summary:&#039;&#039;&#039; Read-only JavaScript function extending SQL queries with custom computations.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
A user-defined function (UDF) is server-side JavaScript logic in Azure Cosmos DB for NoSQL that extends the SQL query language with custom scalar computations (e.g., custom string formatting or calculations), callable from within a SQL query. Unlike stored procedures and triggers, UDFs are read-only and cannot modify data.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;[Image: udf.png (User-Defined Function)]&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== More Info &amp;amp; Links ==&lt;br /&gt;
* [https://learn.microsoft.com/en-us/azure/cosmos-db/nosql/how-to-write-stored-procedures-triggers-udfs#udfs Microsoft Learn: How to write user-defined functions]&lt;br /&gt;
&lt;br /&gt;
== DP-420 Style Practice Questions ==&lt;br /&gt;
&#039;&#039;&#039;Q1.&#039;&#039;&#039; What is the primary purpose of a user-defined function (UDF) in Azure Cosmos DB for NoSQL?&lt;br /&gt;
* A. Extending SQL queries with custom, read-only scalar computations&lt;br /&gt;
* B. Performing multi-item transactional writes&lt;br /&gt;
* C. Automatically triggering on every item creation&lt;br /&gt;
* D. Managing container-level throughput&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q2.&#039;&#039;&#039; Can a UDF modify data in Azure Cosmos DB?&lt;br /&gt;
* A. No, UDFs are read-only and cannot modify data&lt;br /&gt;
* B. Yes, UDFs can perform inserts, updates, and deletes&lt;br /&gt;
* C. Only if invoked from a stored procedure&lt;br /&gt;
* D. Only for items within the same partition&lt;br /&gt;
&lt;br /&gt;
== Answer Key ==&lt;br /&gt;
&#039;&#039;Answers are listed at the very end so you can attempt the questions first.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Q1 (User-Defined Function (UDF)):&#039;&#039;&#039; A. Extending SQL queries with custom, read-only scalar computations — UDFs add custom computational logic callable from SQL queries, but unlike stored procedures/triggers, they cannot write data.&lt;br /&gt;
* &#039;&#039;&#039;Q2 (User-Defined Function (UDF)):&#039;&#039;&#039; A. No, UDFs are read-only and cannot modify data — UDFs are restricted to read-only scalar computation and cannot write or modify data.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;DP-420: Designing and Implementing Cloud-Native Applications Using Microsoft Azure Cosmos DB — term detail page&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[Category:DP-420 Terminology]]&lt;br /&gt;
[[Category:Server-Side Programming]]&lt;/div&gt;</summary>
		<author><name>Anko</name></author>
	</entry>
</feed>