View Active Streams | DP-203: Data Engineering on Microsoft Azure | Microsoft Exam Guide

View Active Streams

Question

You are the team leader and while working on the project, one of your team members is confused about which command to invoke to view the list of active streams? What will you advise him?

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D.

Correct Answer: D

Invoke the command spark.streams.active to see the list of active streams.

Option A is incorrect.

spark.view.active is not the right command.

Option B is incorrect.

spark.view.activeStreams is not a valid command.

Option C is incorrect.

Invoking spark.streams.show won't help in getting the list of active streams.

Option D is correct.

spark.streams.active should be invoked to see the list of active streams.

To know more about structured streaming programming, please visit the below-given link:

The correct command to view the list of active streams in Apache Spark is spark.streams.active. Therefore, the correct answer to the question is D.

Here's an explanation of each of the options:

A. spark.view.active: This is not a valid command in Apache Spark. The correct syntax to view the list of active streams in Spark is spark.streams.active.

B. spark.view.activeStreams: This is not a valid command in Apache Spark. The correct syntax to view the list of active streams in Spark is spark.streams.active.

C. spark.streams.show: This command is used to display the details of a particular streaming query, not to view the list of active streams.

D. spark.streams.active: This command is used to view the list of active streams in Apache Spark. When this command is executed, it returns a DataFrame that contains information about all the active streams running in the SparkSession.

Therefore, the correct command to view the list of active streams in Apache Spark is spark.streams.active.