exam questions

Exam DP-500 All Questions

View all questions & answers for the DP-500 exam

Exam DP-500 topic 1 question 185 discussion

Actual exam question from Microsoft's DP-500
Question #: 185
Topic #: 1
[All DP-500 Questions]

HOTSPOT
-

You have an Azure Synapse Analytics workspace that contains an Apache Spark pool.

You create a notebook and configure a cell that runs the following SparkSQL query.

SELECT ProductID, ProductName, Category

From products
-

You need to create a column chart by using the built-in charting capability. The solution must visualize the distribution of product IDs across product categories.

How should you complete the column chart? To answer, select the appropriate options in the answer area.

NOTE: Each correct selection is worth one point.

Show Suggested Answer Hide Answer
Suggested Answer:

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
Momoanwar
1 year, 5 months ago
Chaggpt : To create a column chart that visualizes the distribution of product IDs across product categories after running your SparkSQL query, you'll need to set the following options in the Chart view: - **Key**: `Category` - This will be your x-axis, which groups the data by Category. - **Values**: `ProductID` - This will determine the values that are being aggregated and visualized, such as the count of ProductIDs. - **Aggregation**: `COUNT` - Since you want to visualize the distribution of ProductIDs, you'll use the COUNT aggregation to show how many ProductIDs fall into each category. These settings will create a column chart where each column represents a category, and the height of the column shows the number of ProductIDs within that category.
upvoted 1 times
...
88f4694
1 year, 6 months ago
Answer is: Category, ProductID and Count. df_grouped = df.groupBy("Category").agg(count("ProductID")
upvoted 2 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 ...