Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.
exam questions

Exam AZ-104 All Questions

View all questions & answers for the AZ-104 exam

Exam AZ-104 topic 2 question 22 discussion

Actual exam question from Microsoft's AZ-104
Question #: 22
Topic #: 2
[All AZ-104 Questions]

You have an Azure subscription named Subscription1 that contains an Azure Log Analytics workspace named Workspace1.
You need to view the error events from a table named Event.
Which query should you run in Workspace1?

  • A. Get-Event Event | where {$_.EventType == "error"}
  • B. search in (Event) "error"
  • C. select * from Event where EventType == "error"
  • D. search in (Event) * | where EventType -eq "error"
Show Suggested Answer Hide Answer
Suggested Answer: B 🗳️

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
GepeNova
Highly Voted 3 years ago
Correct B Tested in lab Home>>Monitor>>Logs All command queries return syntax error except Search in (Event) "error"
upvoted 45 times
djhyfdgjk
7 months, 3 weeks ago
Just testet in actual Azure LAW. "B" returns syntax error.
upvoted 1 times
...
...
NaoVaz
Highly Voted 2 years ago
Selected Answer: B
B) 'search in (Event) "error"' Seems to be the correct option. Tested in lab.
upvoted 7 times
...
mcc
Most Recent 2 weeks, 2 days ago
Correct B // 1. Simple term search over all unrestricted tables and views of the database in scope search "billg" // 2. Like (1), but looking only for records that match both terms search "billg" and ("steveb" or "satyan") // 3. Like (1), but looking only in the TraceEvent table search in (TraceEvent) and "billg" // 4. Like (2), but performing a case-sensitive match of all terms search "BillB" and ("SteveB" or "SatyaN") // 5. Like (1), but restricting the match to some columns search CEO:"billg" or CSA:"billg" // 6. Like (1), but only for some specific time limit search "billg" and Timestamp >= datetime(1981-01-01) // 7. Searches over all the higher-ups search in (C*, TF) "billg" or "davec" or "steveb" // 8. A different way to say (7). Prefer to use (7) when possible union C*, TF | search "billg" or "davec" or "steveb"
upvoted 3 times
...
MCLC2021
2 weeks, 2 days ago
The correct option in Kusto Query Language (KQL) is C: Option C: select * from Event where EventType == "error" This command selects all rows from the table named “Event” where the value of the column “EventType” is equal to “error”. The other options are not syntactically correct in KQL: Option A: Get-Event Event | where {$_.EventType == "error"} This is not a valid syntax in KQL. The “Get-Event” command does not exist in KQL. Option B: search in (Event) "error" Although it resembles KQL, it is not a valid syntax. The keyword “search” is not used this way in KQL. Option D: search in (Event) * | where EventType -eq "error" Similar to option B, the “search” keyword is not used this way in KQL. Additionally, the comparison should be with “==”, not “-eq”.
upvoted 4 times
...
SeMo0o0o0o
1 month ago
Selected Answer: B
B is corerct
upvoted 1 times
...
Neel2211
1 month ago
The correct correct answer would be : D. search in (Event) * | where EventType -eq "error" Log Analytics Workspace has its root usage with the querying of data/logs specifically using the KQL. Option D represents the correct syntax for querying using KQL.
upvoted 1 times
...
Wojer
7 months ago
Event | where EventLevelName == "Error"
upvoted 1 times
...
ricardona
11 months, 1 week ago
Selected Answer: B
The correct query to run in Workspace1 to view the error events from a table named Event is: B. search in (Event) “error” This query will search for the term “error” in the Event table. The other options are not valid queries for Azure Log Analytics. Azure Log Analytics uses a version of the Kusto query language, and these queries do not conform to the correct syntax. For example, the ‘select’ statement is not used in Kusto, and PowerShell-style syntax (like option A) is not applicable here. Option D is incorrect because it attempts to use a mix of Kusto and PowerShell syntax.
upvoted 2 times
...
Mehedi007
1 year, 2 months ago
Selected Answer: B
Tested in lab.
upvoted 1 times
...
Andreas_Czech
1 year, 4 months ago
Selected Answer: B
like GepeNova Correct is B Tested in LAB
upvoted 2 times
...
Mysystemad
1 year, 4 months ago
B correct
upvoted 1 times
...
Exilic
1 year, 5 months ago
Selected Answer: D
OpenAI "The correct query to view the error events from the table named Event in the Azure Log Analytics workspace Workspace1 is: D. search in (Event) * | where EventType -eq "error" Explanation: Option A is a PowerShell command, not a Log Analytics query language (KQL) command. Option B is not a valid KQL query. The correct syntax for searching for events in a Log Analytics workspace is "search <query>". Option C is a valid KQL query, but it is not the best option since it selects all columns from the Event table. It is recommended to select only the necessary columns to improve the query performance. Option D is a valid KQL query that searches for all events in the Event table where the EventType column equals "error". This is the correct query to view the error events from the Event table."
upvoted 2 times
Kosey
12 months ago
B is correct. Option D uses a syntax that is similar to KQL, but the correct syntax would be: D. search in (Event) * | where EventType == "error"
upvoted 2 times
...
Nana1990
1 year, 3 months ago
Apologies for the confusion. You are correct. The correct query to view the error events from the "Event" table in Azure Log Analytics Workspace1 is: B. search in (Event) "error" This query uses the 'search' operator to search for the keyword "error" within the "Event" table in Azure Log Analytics Workspace1. It will return all the events that contain the keyword "error".
upvoted 1 times
...
xRiot007
1 year, 4 months ago
Lab tests show B is the correct option. This should override whatever OpenAI answered.
upvoted 3 times
...
...
hz78
1 year, 5 months ago
D is correct. D. search in (Event) * | where EventType -eq "error" Explanation: Option A is a PowerShell command and not a Log Analytics query language (KQL) query. It won't work in Workspace1. Option B is a search query, but it is using a different syntax than KQL. The correct syntax for KQL is 'search' instead of 'search in', and the where clause should be used to filter the results. Option C is a KQL query, but it is using a wrong syntax. The correct syntax to filter data based on a condition is using 'where' instead of '==' in KQL. Option D is a valid KQL query to search the Event table in Workspace1 and filter the results based on the 'EventType' field that contains the value "error". Therefore, option D is the correct answer.
upvoted 4 times
jackill
1 year, 2 months ago
"D" is not correct because the equality operator is not "-eq", but "==". See https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/logicaloperators
upvoted 1 times
...
...
Madbo
1 year, 5 months ago
Option B is not a valid query language syntax for Azure Log Analytics. Option D is the correct answer, which uses the search operator to search the Event table and filter the results by EventType equal to "error". Thank you for bringing this to my attention and please let me know if you have any further questions.
upvoted 1 times
...
MaharshiRabari
1 year, 7 months ago
B Correct
upvoted 2 times
...
EmnCours
2 years, 1 month ago
Selected Answer: B
Correct Answer: B
upvoted 1 times
...
epomatti
2 years, 5 months ago
Selected Answer: B
B is correct. Check the alternative correct comments as well in the details.
upvoted 1 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...