nerdexam
Microsoft

DP-700 · Question #33

You have a KQL database that contains two tables named Stream and Reference. Stream contains streaming data in the following format: Column name Data type Timestamp Datetime Geolocation Dynamic…

The correct answer is B. No. Changing the project operator to extend in the KQL queryset will not reduce runtime; in this context, project is used to select a subset of columns, whereas extend would add new columns while retaining all existing ones, potentially increasing the data volume passed through the…

Monitor and optimize a data analytics solution

Question

You have a KQL database that contains two tables named Stream and Reference. Stream contains streaming data in the following format: Column name Data type Timestamp Datetime Geolocation Dynamic Temperature Decimal DeviceId Int Reference contains reference data in the following format. Column name Data type DeviceId Int DeviceName String Both tables contain millions of rows. You have the following KQL queryset. 01 stream 02 | extend lat = todecimal(geolocation.Latitude), long = todecimal(geolocation.Longitude) 03 | join kind=inner Reference on DeviceId 04 | project Timestamp, lat, long, Temperature, DeviceName 05 | filter Temperature >= 10 06 | render scatterchart with (kind = map) You need to reduce how long it takes to run the KQL queryset. Solution: You change project to extend. Does this meet the goal?

Options

  • AYes
  • BNo

How the community answered

(37 responses)
  • A
    24% (9)
  • B
    76% (28)

Why each option

Changing the project operator to extend in the KQL queryset will not reduce runtime; in this context, project is used to select a subset of columns, whereas extend would add new columns while retaining all existing ones, potentially increasing the data volume passed through the pipeline.

AYes

Replacing project with extend in this scenario would result in passing more data down the pipeline because extend keeps all original columns, whereas project discards unwanted ones, making it inefficient for reducing runtime.

BNoCorrect

The project operator on line 04 is used to select a specific subset of columns after the join, effectively reducing the data's width for subsequent operations. Changing project to extend would instead retain all columns from the preceding join operation and then add any new calculated columns, leading to a wider dataset being processed by the filter and render stages, which would likely increase rather than decrease query runtime.

Concept tested: KQL project vs extend performance implications

Source: https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/projectoperator

Topics

#KQL optimization#Query performance#Project operator#Extend operator

Community Discussion

No community discussion yet for this question.

Full DP-700 Practice