DP-420 · Question #157
You have an Azure Cosmos DB for NoSQL account that contains a database named DB1 and a container named Container1. You need to manage the account by using the Azure Cosmos DB SDK. What should you do?
The correct answer is D. Create a user defined function (UDF) in Container1. To manage an Azure Cosmos DB for NoSQL account using the Azure Cosmos DB SDK, one valid action is to create a user defined function (UDF) within a container.
Question
You have an Azure Cosmos DB for NoSQL account that contains a database named DB1 and a container named Container1. You need to manage the account by using the Azure Cosmos DB SDK. What should you do?
Options
- ACreate a container in DB1.
- BList the physical partitions of Container1.
- CRead a stored procedure in Container1.
- DCreate a user defined function (UDF) in Container1.
How the community answered
(39 responses)- A8% (3)
- B3% (1)
- C3% (1)
- D87% (34)
Why each option
To manage an Azure Cosmos DB for NoSQL account using the Azure Cosmos DB SDK, one valid action is to create a user defined function (UDF) within a container.
Creating a container is a valid SDK operation, but the question asks for 'what should you do' and creating a UDF is also a valid management action.
Listing physical partitions is typically an advanced operational detail and not a primary or common management operation exposed directly via the client SDK for general application development.
Reading a stored procedure is a valid SDK operation, but creating a UDF (D) is also a valid management operation involving the creation of server-side logic.
Creating a User Defined Function (UDF) is a programmatic operation that can be performed using the Azure Cosmos DB SDK for NoSQL. UDFs are server-side scripts stored within a container to extend query language capabilities, making their creation a valid management task via the SDK.
Concept tested: Azure Cosmos DB SDK management operations
Source: https://learn.microsoft.com/azure/cosmos-db/sql/how-to-create-stored-procedures-triggers-udfs?tabs=portal
Topics
Community Discussion
No community discussion yet for this question.