nerdexam
Microsoft

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.

Integrate an Azure Cosmos DB solution

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)
  • A
    8% (3)
  • B
    3% (1)
  • C
    3% (1)
  • D
    87% (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.

ACreate a container in DB1.

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.

BList the physical partitions of Container1.

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.

CRead a stored procedure in Container1.

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.

DCreate a user defined function (UDF) in Container1.Correct

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

#Azure Cosmos DB SDK#User Defined Functions (UDFs)#Server-side programming#Container management

Community Discussion

No community discussion yet for this question.

Full DP-420 Practice