I have noticed a mistake in question 5 of the quiz in the Quiz - Stream Processing and Analysis with Apache Spark E-learning (self-paced) which is a part of the Apache Spark Developer Learning Plan on Databricks Academy.
The question is:
Which method is used to properly stop a streaming query and wait for the final batch to complete processing?
Options:
1. query.stop()
2. query.terminate()
3. query.terminate()
query.stop() and query.awaitTermination()
4. query.awaitTermination()
The option 3 is listed as the correct answer but it also lists query.terminate() which is not at all a streaming query method as per the latest pyspark API documentation and reference. (https://spark.apache.org/docs/latest/api/python/reference/pyspark.ss/api/pyspark.sql.streaming.Strea... )
Answers to this question should be updated to avoid any confusion in future.