Answer Posted / Rishabh Kanthariya
"To save an RDD (Resilient Distributed Dataset) in Apache Spark, you can use the saveAsTextFile() or saveAsHadoopFiles() methods. Here's an example for saving as text file:
```python
rdd.saveAsTextFile('output_path')
```
For saving as a specific format, such as CSV or Parquet, you can use saveAsTextFile('output_path', use_partitioning=True) followed by converting the RDD to required format using appropriate transformations."
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers