AZ-203 Exam QuestionsBrowse all questions from this exam

AZ-203 Exam - Question 44


HOTSPOT -

You have an app that stores player scores for an online game. The app stores data in Azure tables using a class named PlayerScore as the table entity. The table is populated with 100,000 records.

You are reviewing the following section of code that is intended to retrieve 20 records where the player score exceeds 15,000. (Line numbers are included for reference only.)

Exam AZ-203 Question 44

You have the following code. (Line numbers are included for reference only.)

Exam AZ-203 Question 44

You store customer information in an Azure Cosmos database. The following data already exists in the database:

Exam AZ-203 Question 44

You develop the following code. (Line numbers are included for reference only.)

Exam AZ-203 Question 44

For each of the following statements, select Yes if the statement is true. Otherwise, select No.

NOTE: Each correct selection is worth one point.

Hot Area:

Show Answer
Correct Answer:

The code queries the Azure table and retrieves the TimePlayed property from the table: No. The query only selects the 'Score' property, not 'TimePlayed'. The code will display a maximum of twenty records: Yes. The 'Take(20)' method limits the number of records to 20. All records will be sent to the client. The client will display records for scores greater than or equal to 15,000: No. Because 'Take(20)' is specified, only 20 records will be sent to the client, not all. The scoreItem.Key property of the KeyValuePairs that ExecuteQuery returns will contain a value for PlayerID: Yes. 'PlayerID' is defined as the 'RowKey', and the 'RowKey' is included in the query results by default.

Discussion

11 comments
Sign in to comment
Daltonic75
Mar 11, 2020

https://www.itexams.com/static/img/exams/Microsoft-AZ-203-1.0/xmlfile-177_1.png

SilverSea
Mar 16, 2020

Daltonic75, I don't know who you are. But clearly, examtopics should pay you for every subscriptions they receive as you did 50% of their work. Thank you.

bhushan_786
Nov 22, 2020

The link provided by him is not relevant here :) It is meant for other question.

altafpatel1984
Dec 6, 2021

but this time he did wrong job ! posted different image.

chaudh
Jul 12, 2020

https://vceguide.com/wp-content/uploads/2020/05/Microsoft-AZ-203-date-05-08-2020_Page_143_Image_0001.jpg

bhushan_786
Nov 22, 2020

The link provided by him is not relevant here :) It is meant for other question.

altafpatel1984
Dec 6, 2021

but this time he did wrong job ! posted different image.

Ric0720
Aug 17, 2020

No,Yes,No,Yes

nikos2001
Jun 30, 2020

Third box should be NO. The client will get not all records, but those fitting the query filter.

godsbane
Jul 4, 2020

Box 3 is No. If .Take() is not specified, a maximum of 1000 records are returned to the client. There is no way all records are returned to the client, what if we have 20 mil records? Reference: https://docs.microsoft.com/bs-latn-ba/java/api/com.microsoft.azure.storage.table.tablequery.take?view=azure-java-legacy

sagnikmukh
Mar 14, 2020

Box 3: should be false, please suggest

VMCoder
Mar 16, 2020

Why do you think so? I think it is correct.

LEOPOLD
Apr 1, 2020

Same conclusion. I thought it would be deferred execution and iteration over the query with execute it so you have a query with .take 20 in it and when iterating you dont get all records sent to the client. (I sure hope thats what happens. Imagine that you had 2000000000 records in that DB all sent to client :D)

khrystyna
Apr 3, 2020

It can be because of method order: Select - get all records to client Where - in memory filtering on client side Take - return just 20 records

LEOPOLD
Apr 1, 2020

Same conclusion. I thought it would be deferred execution and iteration over the query with execute it so you have a query with .take 20 in it and when iterating you dont get all records sent to the client. (I sure hope thats what happens. Imagine that you had 2000000000 records in that DB all sent to client :D)

khrystyna
Apr 3, 2020

It can be because of method order: Select - get all records to client Where - in memory filtering on client side Take - return just 20 records

Ummara
Aug 14, 2020

the partition key is the game id, and select is not on the partition key. In such a case all records are retrieved, called Table Scan, and therefore Client will filter records from the data fetched.

Ummara
Aug 14, 2020

A Table Scan does not include the PartitionKey and is very inefficient because it searches all of the partitions that make up your table in turn for any matching entities. It will perform a table scan regardless of whether or not your filter uses the RowKey. For example: $filter=LastName eq 'Jones' https://docs.microsoft.com/en-us/azure/storage/tables/table-storage-design-for-query

lau13
May 26, 2020

options [Yes|No]The code queries the Azure table and retrieves the TimePlayed property from the table [Yes|No]The code will display a maximum of twenty records [Yes|No]All records will be sent to the client. The client will display records for scores greater than or equal to 15,000. [Yes|No]The scoreItem.Key property of the KeyValuePairs that ExecuteQuery returns will contain a value for PlayerID.

realbart
Apr 1, 2020

Not all records, but only 20 records will not be sent to the client but written to the console

Praveen24by7
Jun 14, 2020

The code queries the Azure table and retrieves the TimePlayed property from the table - No The code will display a maximum of twenty records - Yes All records will be sent to the client. The client will display records for scores greater than or equal to 15,000. - Yes The scoreItem.Key property of the KeyValuePairs that ExecuteQuery returns will contain a value for PlayerID. - Yes

pranay
Jul 7, 2020

Third answer should be NO

Chilred
Dec 18, 2020

Then explain why

Chilred
Dec 18, 2020

Then explain why

NPaul_92
Sep 28, 2020

https://vceguide.com/where-the-player-score-exceeds-15000-line-numbers-are-included-for-reference-only/

saeza100
Jun 2, 2020

Box4 should be "No" , we select just "Score" with "Query"

pranay
Jul 7, 2020

PlayerId is a rowKey so it will be returned anyhow. You don't need to mention rowKey and PartitionKey.

Juanlu
Feb 6, 2021

yes, but as I know, Partitionkey and Rowkey are also included by default, so de answer should be YES.

Juanlu
Feb 6, 2021

In my opinion, all answer are correct as the solution mention, so: YES, NO, NO, NO !

Juanlu
Feb 6, 2021

NO YES. YES. All record are retuned to the client. The máximum value are 1000. If so, tokenccontinuation returned and we can use: ExecuteQuerySegmentedAsync YES. By default PartitionKey and RowKey are already included by default in the select clause. https://www.examtopics.com/discussions/microsoft/view/16363-exam-az-203-topic-24-question-13-discussion/