AZ-220 Exam QuestionsBrowse all questions from this exam

AZ-220 Exam - Question 106


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 Stream Analytics job that receives input from an Azure IoT hub and sends the outputs to Azure Blob storage. The job has compatibility level

1.1 and six streaming units.

You have the following query for the job.

Exam AZ-220 Question 106

You plan to increase the streaming unit count to 12.

You need to optimize the job to take advantage of the additional streaming units and increase the throughput.

Solution: You change the query to the following.

Exam AZ-220 Question 106

Does this meet the goal?

Show Answer
Correct Answer: B

To optimize the job and take advantage of the increased streaming units, the query should be partitioned correctly. However, for compatibility level 1.1, every step of a multi-step query requires the use of 'PARTITION BY PartitionID'. The given query only includes 'PARTITION BY PartitionID' for the input step but not for the output step. Therefore, it does not fully meet the requirements for partitioning in compatibility level 1.1. Thus, this solution does not meet the goal.

Discussion

7 comments
Sign in to comment
Aimer4218
Nov 18, 2021

The answer is Yes. Only first step is required since the input is from EventHub /IotHub. 2nd step doesn't need to be partition as output to Blob does not require partition. Only ouput to EventHub, IotHub and Cosmos DB are required to be partition. As for the SU: (Source 2) - The input data stream is partitioned by 3. -> can be scaled up to 18 SUs: (From above we can say 1 partition can go up to 6 SU) - The query contains two steps. The input step is partitioned and the second step is not. - The SELECT statement reads from the partitioned input. Since the query satisfy above requirement, but doesn't specify data stream partition. The total SU would be around 12 which 6 is from the partition step and another 6 is from the unpartitioned step. Source : 1. https://docs.microsoft.com/en-us/azure/stream-analytics/stream-analytics-parallelization#inputs 2. https://docs.microsoft.com/en-us/azure/stream-analytics/stream-analytics-parallelization#calculate-the-max-streaming-units-for-a-job

tita_tovenaar
Jun 29, 2021

answer is No because compatibility is 1.1, see example in https://docs.microsoft.com/en-us/azure/stream-analytics/stream-analytics-parallelization For compatibility 1.1, a multistep query requires FROM … *PARTIONBY* …in both parts

mgiuseppe2
Mar 14, 2021

Correct because the second query doesn't produce the same result as the first query. You Need to use an aggregation step. https://docs.microsoft.com/en-us/azure/stream-analytics/stream-analytics-parallelization#examples-of-scaling

Leonarduino87
Oct 1, 2021

No, you miss the point of the doc: if (and only if) you have a input partition key that it is different from the query partition key, you can have a spread of the values. For example, if your Event Hub (input) is partitioned by the colour of the cars (black, red and yellow cars), and you want to know how many cars have passed through the tollbooth (query), you can't obtain the result in a single query grouped by tollboothId because what you obtain is how many cars pass through the tollbooth splitted by colours instead (black cars through tollbooth 1, red cars through tollbooth 1 and yellow cars through tollbooth 1). So, you need to sum these results in a single record (all of the black, red and yellow cars through the tollbooth 1). That means another query

Ashwinee
Mar 28, 2021

this will increase to 18 hence the ans is NO.

Leonarduino87
Oct 1, 2021

If you parallelize your stream analytics job you can add more SUs to increase your throughput but it doesn't mean that you need more SUs to complete your job (it is exactly the opposite). The answer is NO because the compatibility 1.1 requires the PARTITION BY clause

Stephan99
May 15, 2021

Since the data stream partition is set to 3, the query can be scaled up to 18 SUs (3 * 6) see https://docs.microsoft.com/en-us/azure/stream-analytics/stream-analytics-parallelization

exam67
Jun 11, 2021

How do you know that there are 3 partitions? There is no such information in the text

Leonarduino87
Oct 1, 2021

The answer is NO...compatibility 1.1 needs to add the PARTITION BY

Marusyk
Nov 22, 2021

Jobs with compatibility level 1.0 or 1.1, requires you to use PARTITION BY PartitionId in all the steps of your query. Multiple steps are allowed, but they all must be partitioned by the same key. https://docs.microsoft.com/en-us/azure/stream-analytics/stream-analytics-parallelization#:~:text=Jobs%20with%20compatibility%20level%201.0%20or%201.1%2C%20requires%20you%20to%20use%20PARTITION%20BY%20PartitionId%20in%20all%20the%20steps%20of%20your%20query.%20Multiple%20steps%20are%20allowed%2C%20but%20they%20all%20must%20be%20partitioned%20by%20the%20same%20key.