- PySpark Cookbook
- Denny Lee Tomasz Drabas
- 81字
- 2021-06-18 19:06:40
.saveAsTextFile(...) action
The saveAsTextFile() action saves your RDD into a text file; note that each partition is a separate file. See the following snippet:
# Saves airports as a text file
# Note, each partition has their own file
# saveAsTextFile
airports.saveAsTextFile("/tmp/denny/airports")
This will actually save the following files:
# Review file structure
# Note that `airports` is a folder with two
# files (part-zzzzz) as the airports RDD is
# comprised of two partitions.
/tmp/denny/airports/_SUCCESS
/tmp/denny/airports/part-00000
/tmp/denny/airports/part-00001
推薦閱讀
- C語言程序設計實踐教程(第2版)
- 企業級Java EE架構設計精深實踐
- 深度學習經典案例解析:基于MATLAB
- SEO智慧
- Learning Python Design Patterns(Second Edition)
- C語言程序設計同步訓練與上機指導(第三版)
- PHP+Ajax+jQuery網站開發項目式教程
- Spring Security Essentials
- Odoo 10 Implementation Cookbook
- OpenMP核心技術指南
- Python語言科研繪圖與學術圖表繪制從入門到精通
- Clojure Polymorphism
- Learning Shiny
- Learning Swift
- 基于Docker的Redis入門與實戰