[Jun 09, 2024] Step by Step Guide to Prepare for DP-420 Exam BrainDumps [Q73-Q92]

Share

Jun 09, 2024 Step by Step Guide to Prepare for DP-420 Exam BrainDumps

Azure Cosmos DB Developer Specialty DP-420 Real Exam Questions and Answers FREE Updated on 2024

NEW QUESTION # 73
You plan to deploy two Azure Cosmos DB Core (SQL) API accounts that will each contain a single database.
The accounts will be configured as shown in the following table.

How should you provision the containers within each account to minimize costs? To answer, select the appropriate options in the answer area.
NOTE: Each correct selection is worth one point.

Answer:

Explanation:

Explanation:

Box 1: Serverless capacity mode
Azure Cosmos DB serverless best fits scenarios where you expect intermittent and unpredictable traffic with long idle times. Because provisioning capacity in such situations isn't required and may be cost-prohibitive, Azure Cosmos DB serverless should be considered in the following use-cases:
Getting started with Azure Cosmos DB
Running applications with bursty, intermittent traffic that is hard to forecast, or low (<10%) average-to-peak traffic ratio Developing, testing, prototyping and running in production new applications where the traffic pattern is unknown Integrating with serverless compute services like Azure Functions Box 2: Provisioned throughput capacity mode and autoscale throughput The use cases of autoscale include:
Variable or unpredictable workloads: When your workloads have variable or unpredictable spikes in usage, autoscale helps by automatically scaling up and down based on usage. Examples include retail websites that have different traffic patterns depending on seasonality; IOT workloads that have spikes at various times during the day; line of business applications that see peak usage a few times a month or year, and more. With autoscale, you no longer need to manually provision for peak or average capacity.
Reference:
https://docs.microsoft.com/en-us/azure/cosmos-db/serverless
https://docs.microsoft.com/en-us/azure/cosmos-db/provision-throughput-autoscale#use-cases-of-autoscale


NEW QUESTION # 74
Note: This question is part of a series of questions that present the same scenario. Each question in the series contains a unique solution that might meet the stated goals. Some question sets might have more than one correct solution, while others might not have a correct solution.
After you answer a question in this section, you will NOT be able to return to it. As a result, these questions will not appear in the review screen.
You have an Azure Cosmos DB Core (SQL) API account named account 1 that uses autoscale throughput.
You need to run an Azure function when the normalized request units per second for a container in account1 exceeds a specific value.
Solution: You configure an application to use the change feed processor to read the change feed and you configure the application to trigger the function.
Does this meet the goal?

  • A. No
  • B. Yes

Answer: A

Explanation:
Explanation
Instead configure an Azure Monitor alert to trigger the function.
You can set up alerts from the Azure Cosmos DB pane or the Azure Monitor service in the Azure portal.
Reference: https://docs.microsoft.com/en-us/azure/cosmos-db/create-alerts


NEW QUESTION # 75
You need to provide a solution for the Azure Functions notifications following updates to con-product. The solution must meet the business requirements and the product catalog requirements.
Which two actions should you perform? Each correct answer presents part of the solution.
NOTE: Each correct selection is worth one point.

  • A. Configure the trigger for each function to use the same leaseCollectionPrefix
  • B. Configure the trigger for each function to use the same leaseCollectionNair.e
  • C. Configure the trigger for each function to use a different leaseCollectionPrefix
  • D. Configure the trigger for each function to use a different leaseCollectionName

Answer: B,C

Explanation:
leaseCollectionPrefix: when set, the value is added as a prefix to the leases created in the Lease collection for this Function. Using a prefix allows two separate Azure Functions to share the same Lease collection by using different prefixes.
Scenario: Use Azure Functions to send notifications about product updates to different recipients.
Trigger the execution of two Azure functions following every update to any document in the con-product container.
Reference:
https://docs.microsoft.com/en-us/azure/azure-functions/functions-bindings-cosmosdb-v2-trigger


NEW QUESTION # 76
You have an Azure Cosmos DB for NoSQL account that frequently receives the same three queries.
You need to configure indexing to minimize RUs consumed by the queries.
Which type of index should you use for each query? To answer, select the appropriate options in the answer area.
NOTE: Each correct selection is worth one point.

Answer:

Explanation:


NEW QUESTION # 77
You have an Azure Cosmos DB for NoSQL container. The container contains items that have the following properties.

You need to protect the data stored in the container by using Always Encrypted. For each property, you must use the strongest type of encryption and ensure that queries execute properly.
What is the strongest type of encryption that you can apply to each property? To answer, select the appropriate options in the answer area.
NOTE: Each correct selection is worth one point.

Answer:

Explanation:

Explanation
Box 1 = Randomized
Box 2 = Deterministic
Always Encrypted for Azure Cosmos DB supports two types of encryption: deterministic and randomized1.
Deterministic encryption always produces the same encrypted value for any given plain text value.
Randomized encryption produces a different encrypted value for the same plain text value.
For dateOfBirth, randomized encryption is the strongest type of encryption because it provides better protection against statistical analysis and brute-force attacks. Deterministic encryption would not be suitable for dateOfBirth because it could reveal patterns or allow equality comparisons1.
For healthStatus, deterministic encryption is the strongest type of encryption because it allows queries to perform equality comparisons and filters on the encrypted property. Randomized encryption would not be suitable for healthStatus because it would prevent any queries on the encrypted property1.


NEW QUESTION # 78
You have an app that stores data in an Azure Cosmos DB Core (SQL) API account The app performs queries that return large result sets.
You need to return a complete result set to the app by using pagination. Each page of results must return 80 items.
Which three actions should you perform in sequence? To answer, move the appropriate actions from the list of actions to the answer area and arrange them in the correct order.

Answer:

Explanation:

1 - Configure the MaxItemCount in QueryRequestOptions
2 - Run the query and provide a continuation token
3 - Append the results to a variable


NEW QUESTION # 79
You have an Azure Cosmos DB Core (SQL) API account.
You run the following query against a container in the account.
SELECT
IS_NUMBER("1234") AS A,
IS_NUMBER(1234) AS B,
IS_NUMBER({prop: 1234}) AS C
What is the output of the query?

  • A. [{"A": true, "B": false, "C": true}]
  • B. [{"A": false, "B": true, "C": false}]
  • C. [{"A": true, "B": true, "C": false}]
  • D. [{"A": true, "B": true, "C": true}]

Answer: B

Explanation:
IS_NUMBER returns a Boolean value indicating if the type of the specified expression is a number.
"1234" is a string, not a number.
Reference: https://docs.microsoft.com/en-us/azure/cosmos-db/sql/sql-query-is-number


NEW QUESTION # 80
You have an Azure Cosmos DB for NoSQL account.
The change feed is enabled on a container named invoice.
You create an Azure function that has a trigger on the change feed.
What is received by the Azure function?

  • A. only the changed properties and the system-defined properties of the updated items
  • B. all the properties of the updated items
  • C. only the partition key and the changed properties of the updated items
  • D. all the properties of the original items and the updated items

Answer: A

Explanation:
According to the Azure Cosmos DB documentation12, the change feed is a persistent record of changes to a container in the order they occur. The change feed outputs the sorted list of documents that were changed in the order in which they were modified.
The Azure function that has a trigger on the change feed receives all the properties of the updated items2. The change feed does not include the original items or only the changed properties. The change feed also includes some system-defined properties such as _ts (the last modified timestamp) and _lsn (the logical sequence number)3.
Therefore, the correct answer is:
A: all the properties of the updated items


NEW QUESTION # 81
You configure a backup for an Azure Cosmos DB for NoSQL account as shown in the following exhibit.

Use the drop-down menus to select the answer choice that completes each statement based on the information presented in the graphic.
NOTE: Each correct selection is worth one point.

Answer:

Explanation:

Explanation
Box 1 = The current backup policy provides protection for: 2 Hours Azure Cosmos DB automatically takes backups of your data at regular intervals. The backup interval and the retention period can be configured from the Azure portal. You can also choose between two backup modes: periodic backup mode and continuous backup mode. Periodic backup mode is the default mode for all existing accounts and it takes a full backup of your database every 4 hours by default. Continuous backup mode is a new mode that allows you to restore to any point of time within either 7 or 30 days1.
For your scenario, based on the exhibit, you have configured a backup for an Azure Cosmos DB for NoSQL account using the periodic backup mode with a backup interval of 1 hour and a retention period of 2 hours.
This means that Azure Cosmos DB will take a full backup of your database every hour and keep only the latest two backups. Therefore, the current backup policy provides protection for 2 hours.
Box 2: In case of emergency, you must (answer choice) to restore the backup = create a support ticket Azure Cosmos DB automatically takes backups of your data at regular intervals. You can configure the backup interval and the retention period from the Azure portal. You can also choose between two backup modes:
periodic backup mode and continuous backup mode. Periodic backup mode is the default mode for all existing accounts and it takes a full backup of your database every 4 hours by default. Continuous backup mode is a new mode that allows you to restore to any point of time within either 7 or 30 days1.
For your scenario, based on the exhibit, you have configured a backup for an Azure Cosmos DB for NoSQL account using the periodic backup mode with a backup interval of 1 hour and a retention period of 2 hours.
This means that Azure Cosmos DB will take a full backup of your database every hour and keep only the latest two backups. In case of emergency, you must create a support ticket to restore the backup. This is the answer to your question.
To restore data from a periodic backup, you need to create a support request with Azure Cosmos DB team and provide the following information:
The name of your Azure Cosmos DB account
The name of the database or container that you want to restore
The date and time (in UTC) that you want to restore from
The name of the target Azure Cosmos DB account where you want to restore the data The name of the target resource group where you want to restore the data The Azure Cosmos DB team will then initiate the restore process and notify you when it is completed2.


NEW QUESTION # 82
You have an Azure Cosmos DB for NoSQL account.
The change feed is enabled on a container named invoice.
You create an Azure function that has a trigger on the change feed.
What is received by the Azure function?

  • A. all the properties of the updated items
  • B. only the changed properties and the system-defined properties of the updated items
  • C. only the partition key and the changed properties of the updated items
  • D. all the properties of the original items and the updated items

Answer: A

Explanation:
Explanation
According to the Azure Cosmos DB documentation , the change feed is a persistent record of changes to a container in the order they occur. The change feed outputs the sorted list of documents that were changed in the order in which they were modified.
The Azure function that has a trigger on the change feed receives all the properties of the updated items2. The change feed does not include the original items or only the changed properties. The change feed also includes some system-defined properties such as _ts (the last modified timestamp) and _lsn (the logical sequence number)3.
Therefore, the correct answer is:
A: all the properties of the updated items


NEW QUESTION # 83
You have a container named container1 in an Azure Cosmos DB Core (SQL) API account.
You need to provide a user named User1 with the ability to insert items into container1 by using role-based access control (RBAC). The solution must use the principle of least privilege.
Which roles should you assign to User1?

  • A. DocumentDB Account Contributor only
  • B. DocumentDB Account Contributor and Cosmos DB Built-in Data Contributor
  • C. Cosmos DB Built-in Data Contributor only
  • D. CosmosDB Operator only

Answer: D

Explanation:
Explanation
Cosmos DB Operator: Can provision Azure Cosmos accounts, databases, and containers. Cannot access any data or use Data Explorer.
Reference: https://docs.microsoft.com/en-us/azure/cosmos-db/role-based-access-control


NEW QUESTION # 84
You are creating a database in an Azure Cosmos DB Core (SQL) API account. The database will be used by an application that will provide users with the ability to share online posts. Users will also be able to submit comments on other users' posts.
You need to store the data shown in the following table.

The application has the following characteristics:
Users can submit an unlimited number of posts.
The average number of posts submitted by a user will be more than 1,000.
Posts can have an unlimited number of comments from different users.
The average number of comments per post will be 100, but many posts will exceed 1,000 comments.
Users will be limited to having a maximum of 20 interests.
For each of the following statements, select Yes if the statement is true. Otherwise, select No.
NOTE: Each correct selection is worth one point.

Answer:

Explanation:


NEW QUESTION # 85
You need to configure an Apache Kafka instance to ingest data from an Azure Cosmos DB Core (SQL) API account. The data from a container named telemetry must be added to a Kafka topic named iot. The solution must store the data in a compact binary format.
Which three configuration items should you include in the solution? Each correct answer presents part of the solution.
NOTE: Each correct selection is worth one point.

  • A. "connector.class": "com.azure.cosmos.kafka.connect.source.CosmosDBSinkConnector"
  • B. "key.converter": "org.apache.kafka.connect.json.JsonConverter"
  • C. "connect.cosmos.containers.topicmap": "iot"
  • D. "connector.class": "com.azure.cosmos.kafka.connect.source.CosmosDBSourceConnector"
  • E. "connect.cosmos.containers.topicmap": "iot#telemetry"
  • F. "key.converter": "io.confluent.connect.avro.AvroConverter"

Answer: A,E,F

Explanation:
C: Avro is binary format, while JSON is text.
F: Kafka Connect for Azure Cosmos DB is a connector to read from and write data to Azure Cosmos DB. The Azure Cosmos DB sink connector allows you to export data from Apache Kafka topics to an Azure Cosmos DB database. The connector polls data from Kafka to write to containers in the database based on the topics subscription.
D: Create the Azure Cosmos DB sink connector in Kafka Connect. The following JSON body defines config for the sink connector.
Extract:
"connector.class": "com.azure.cosmos.kafka.connect.sink.CosmosDBSinkConnector",
"key.converter": "org.apache.kafka.connect.json.AvroConverter"
"connect.cosmos.containers.topicmap": "hotels#kafka"
Incorrect Answers:
B: JSON is plain text.
Note, full example:
{
"name": "cosmosdb-sink-connector",
"config": {
"connector.class": "com.azure.cosmos.kafka.connect.sink.CosmosDBSinkConnector",
"tasks.max": "1",
"topics": [
"hotels"
],
"value.converter": "org.apache.kafka.connect.json.AvroConverter",
"value.converter.schemas.enable": "false",
"key.converter": "org.apache.kafka.connect.json.AvroConverter",
"key.converter.schemas.enable": "false",
"connect.cosmos.connection.endpoint": "https://<cosmosinstance-name>.documents.azure.com:443/",
"connect.cosmos.master.key": "<cosmosdbprimarykey>",
"connect.cosmos.databasename": "kafkaconnect",
"connect.cosmos.containers.topicmap": "hotels#kafka"
}
}
Reference:
https://docs.microsoft.com/en-us/azure/cosmos-db/sql/kafka-connector-sink
https://www.confluent.io/blog/kafka-connect-deep-dive-converters-serialization-explained/


NEW QUESTION # 86
The following is a sample of a document in orders.

The orders container uses customer as the partition key.
You need to provide a report of the total items ordered per month by item type. The solution must meet the following requirements:
Ensure that the report can run as quickly as possible.
Minimize the consumption of request units (RUs).
What should you do?

  • A. Configure the report to query orders by using a SQL query.
  • B. Configure the report to query a new aggregate container. Populate the aggregates by using SQL queries that run daily.
  • C. Configure the report to query orders by using a SQL query through a dedicated gateway.
  • D. Configure the report to query a new aggregate container. Populate the aggregates by using the change feed.

Answer: B

Explanation:
Explanation
You can facilitate aggregate data by using Change Feed and Azure Functions, and then use it for reporting.
Reference: https://docs.microsoft.com/en-us/azure/cosmos-db/change-feed


NEW QUESTION # 87
You have an Azure Cosmos DB Core (SQL) API account used by an application named App1.
You open the Insights pane for the account and see the following chart.

Use the drop-down menus to select the answer choice that answers each question based on the information presented in the graphic.
NOTE: Each correct selection is worth one point.

Answer:

Explanation:

Explanation

Box 1: incorrect connection URLs
400 Bad Request: Returned when there is an error in the request URI, headers, or body. The response body will contain an error message explaining what the specific problem is.
The HyperText Transfer Protocol (HTTP) 400 Bad Request response status code indicates that the server cannot or will not process the request due to something that is perceived to be a client error (for example, malformed request syntax, invalid request message framing, or deceptive request routing).
Box 2: 6 thousand
201 Created: Success on PUT or POST. Object created or updated successfully.
Note:
200 OK: Success on GET, PUT, or POST. Returned for a successful response.
404 Not Found: Returned when a resource does not exist on the server. If you are managing or querying an index, check the syntax and verify the index name is specified correctly.
Reference: https://docs.microsoft.com/en-us/rest/api/searchservice/http-status-codes


NEW QUESTION # 88
You have a container named container1 in an Azure Cosmos DB for NoSQL account named account1 that is set to the session default consistency level. The average size of an item in container1 is 20 KB.
You have an application named App1 that uses the Azure Cosmos DB SDK and performs a point read on the same set of items in container1 every minute.
You need to minimize the consumption of the request units (RUs) associated to the reads by App1. What should you do?

  • A. In account1, provision a dedicated gateway and integrated cache
  • B. In App1, change the consistency level of read requests to consistent prefix.
  • C. In account1, change the default consistency level to bounded staleness.
  • D. In App1, modify the connection policy settings.

Answer: B

Explanation:
Explanation
The cost of a point read for a 1 KB item is 1 RU. The cost of other operations depends on factors such as item size, indexing policy, consistency level, and query complexity . To minimize the consumption of RUs, you can optimize these factors according to your application needs.
For your scenario, one possible way to minimize the consumption of RUs associated to the reads by App1 is to change the consistency level of read requests to consistent prefix. Consistent prefix is a lower consistency level than session, which is the default consistency level for Azure Cosmos DB. Lower consistency levels consume fewer RUs than higher consistency levels2. Consistent prefix guarantees that reads never see out-of-order writes and that monotonic reads are preserved1. This may be suitable for your application if you can tolerate some eventual consistency.


NEW QUESTION # 89
You have a container named container1 in an Azure Cosmos DB Core (SQL) API account. The container1 container has 120 GB of data.
The following is a sample of a document in container1.

The orderId property is used as the partition key.
For each of the following statements, select Yes if the statement is true. Otherwise, select No.
NOTE: Each correct selection is worth one point.

Answer:

Explanation:


NEW QUESTION # 90
Note: This question is part of a series of questions that present the same scenario. Each question in the series contains a unique solution that might meet the stated goals. Some question sets might have more than one correct solution, while others might not have a correct solution.
After you answer a question in this section, you will NOT be able to return to it. As a result, these questions will not appear in the review screen.
You have an Azure Cosmos DB Core (SQL) API account named account 1 that uses autoscale throughput.
You need to run an Azure function when the normalized request units per second for a container in account1 exceeds a specific value.
Solution: You configure the function to have an Azure CosmosDB trigger.
Does this meet the goal?

  • A. No
  • B. Yes

Answer: A

Explanation:
Instead configure an Azure Monitor alert to trigger the function.
You can set up alerts from the Azure Cosmos DB pane or the Azure Monitor service in the Azure portal.


NEW QUESTION # 91
The settings for a container in an Azure Cosmos DB Core (SQL) API account are configured as shown in the following exhibit.

Which statement describes the configuration of the container?

  • A. All items will be deleted after one hour.
  • B. Items stored in the collection will expire only if the item has a time to live value.
  • C. Items stored in the collection will be retained always, regardless of the items time to live value.
  • D. All items will be deleted after one year.

Answer: B

Explanation:
When DefaultTimeToLive is -1 then your Time to Live setting is On (No default) Time to Live on a container, if present and the value is set to "-1", it is equal to infinity, and items don't expire by default.
Time to Live on an item:
This Property is applicable only if DefaultTimeToLive is present and it is not set to null for the parent container.
If present, it overrides the DefaultTimeToLive value of the parent container.


NEW QUESTION # 92
......


The DP-420 certification exam is designed to test candidates on a range of topics, including Azure Cosmos DB data modeling, partitioning, indexing, and querying. It also covers concepts related to Azure Functions, Azure Event Hubs, Azure Stream Analytics, and Azure Cosmos DB Change Feed. DP-420 exam is intended for professionals who have experience working with Azure Cosmos DB and are knowledgeable about cloud computing concepts and principles.

 

Ultimate Guide to Prepare DP-420 Certification Exam for Azure Cosmos DB Developer Specialty: https://examtorrent.actualcollection.com/DP-420-exam-questions.html