An administrator wants to review write operations on virtual machines within an Azure subscription. They open the Log Analytics query editor to search the `AzureActivity` table. The query must filter for logs where `OperationNameValue` is equal to `'Microsoft.Compute/virtualMachines/write'` and restrict the output to exactly records.
Which of the following queries use valid Kusto Query Language (KQL) syntax to achieve this goal? (Choose two.)
- AzureActivity | where OperationNameValue == "Microsoft.Compute/virtualMachines/write" | limit 5Cevap
- AzureActivity | where OperationNameValue == "Microsoft.Compute/virtualMachines/write" | take 5Cevap
- CAzureActivity | where OperationNameValue = "Microsoft.Compute/virtualMachines/write" | limit 5
- DSELECT * FROM AzureActivity WHERE OperationNameValue = 'Microsoft.Compute/virtualMachines/write' LIMIT 5
Cevap
The correct queries start with the 'AzureActivity' table, filter the logs using the 'where' operator with double equals '==', and limit the records using either 'limit 5' or 'take 5'.
The correct queries begin with the data source 'AzureActivity', apply a pipeline using the pipe character '|', use the 'where' operator with the equality operator '==', and use either 'limit 5' or 'take 5'. In KQL, 'limit' and 'take' are synonyms and perform the same action of limiting the result set.
Adım Adım Çözüm
Anahtar Kavram
Basic KQL query structure, comparison operators, and row-limiting operators.
Tahmini Süre:45s