QuestionQ77

VerifiedDeveloping Apache Spark™ DataFrame/DataSet API Applications

Which command replaces an existing JSON file while writing a DataFrame?

Explanation

DataFrameWriter.mode("overwrite") configures the write operation to replace existing data, and json(path) writes the DataFrame in JSON format. The documented JSON-writing API also supports overwrite mode. PySpark DataFrameWriter.mode and PySpark DataFrameWriter.json.

Learn more

Community Discussion

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