What is the main goal of the Session 8 homework?
- Build a small PySpark SQL-style analytics report
- Install only pandas and stop
- Write a web page with no data
- Delete the Spark session files
Answer: 1 Type: single Time: 45 Explanation: The homework asks students to use PySpark to create data, query it, and explain results.
Where should students usually run the homework?
- Google Colab
- A spreadsheet cell only
- The
.gitfolder - A browser bookmark
Answer: 1 Type: single Time: 40 Explanation: The homework is designed for Google Colab unless students completed local setup.
How many rows should the homework DataFrame have at minimum?
- 4
- 8
- 12
- 1000
Answer: 3 Type: single Time: 40 Explanation: The homework requires at least 12 rows.
Which item is required before using Spark SQL on a DataFrame?
- Register the DataFrame as a temporary view
- Convert all rows into screenshots
- Delete every calculated column
- Rename the notebook to
requirements.txt
Answer: 1 Type: single Time: 45 Explanation: Spark SQL queries need a table or view name, such as a temporary view.
What is a calculated column?
- A new column made from existing data or logic
- A column that cannot be queried
- A quiz answer hidden in the DataFrame
- A folder inside
solutions
Answer: 1
Type: single
Time: 45
Explanation: A calculated column is derived from other values, such as quantity * unit_price.
How many SQL queries should the homework include at minimum?
- 1
- 2
- 4
- 10
Answer: 3 Type: single Time: 40 Explanation: The homework asks for at least 4 SQL queries.
Which SQL clause is required for at least one grouped summary?
- GROUP BY
- INSTALL BY
- NOTEBOOK BY
- SPARK BY
Answer: 1
Type: single
Time: 40
Explanation: GROUP BY creates grouped summaries such as revenue by city or average score by track.
Which SQL clause is required for at least one sorted result?
- ORDER BY
- VIEW BY
- CREATE BY
- PYTHON BY
Answer: 1
Type: single
Time: 40
Explanation: ORDER BY sorts query results.
What should students avoid using for the main homework analytics queries?
- pandas
- Spark SQL
- PySpark DataFrames
- Google Colab
Answer: 1 Type: single Time: 45 Explanation: The homework is PySpark practice, so pandas should not be used for the main analytics queries.
What should the homework reflection include?
- What felt easier or harder in Spark SQL compared with DataFrame syntax
- Only the Python version number
- A list of unrelated websites
- A deleted copy of the notebook
Answer: 1 Type: single Time: 50 Explanation: The reflection asks students to compare the SQL and DataFrame approaches.