QuestionQ76

VerifiedDeveloping Apache Spark™ DataFrame/DataSet API Applications

Which of the following code blocks writes the DataFrame storesDF to the file path filePath in Parquet format, overwriting any files that already exist at that location?

Explanation

PySpark uses DataFrame.write to obtain a DataFrameWriter; mode("overwrite") sets overwrite behavior, and parquet(filePath) saves the DataFrame as Parquet at the specified path.

Community Discussion

No comments yet. Be the first to start the discussion!