当前位置:网站首页>RDD和DataFrame和Dataset
RDD和DataFrame和Dataset
2022-08-05 05:12:00 【价值成长】
1. DataFrame
为了支持结构化数据的处理,Spark SQL 提供了新的数据结构 DataFrame。DataFrame 是一个由具名列组成的数据集。它在概念上等同于关系数据库中的表或 R/Python 语言中的 data frame
。 由于 Spark SQL 支持多种语言的开发,所以每种语言都定义了 DataFrame
的抽象
2. DataSet
Dataset 也是分布式的数据集合,它集成了 RDD 和 DataFrame 的优点,具备强类型的特点,同时支持 Lambda 函数。Spark 2.0 后,为了方便开发者,Spark 将 DataFrame 和 Dataset 的 API 融合到一起,提供了结构化的 API(Structured API),即用户可以通过一套标准的 API 就能完成对两者的操作。
Spark SQL && DataFrame && Dataset
如果你用的是 Spark SQL 的查询语句,则直到运行时你才会发现有语法错误,而如果你用的是 DataFrame 和 Dataset,则在编译时就可以发现错误 (这节省了开发时间和整体代价)。
DataFrame & DataSet & RDDs
- RDDs 适合非结构化数据的处理,而 DataFrame & DataSet 更适合结构化数据和半结构化的处理;
- DataFrame & DataSet 可以通过统一的 Structured API 进行访问,而 RDDs 则更适合函数式编程的场景;
- 相比于 DataFrame 而言,DataSet 是强类型的 (Typed),有着更为严格的静态类型检查;
- DataSets、DataFrames、SQL 的底层都依赖了 RDDs API,并对外提供结构化的访问接口。
边栏推荐
- Shell(4) Conditional Control Statement
- 基于Web的商城后台管理系统的设计与实现
- jvm three heap and stack
- How can Flutter parent and child components receive click events
- OFDM 十六讲 5 -Discrete Convolution, ISI and ICI on DMT/OFDM Systems
- Judgment statement _switch and case
- Qt produces 18 frames of Cupid to express his love, is it your Cupid!!!
- [Student Graduation Project] Design and Implementation of the Website Based on the Web Student Information Management System (13 pages)
- Redis - 13. Development Specifications
- ESP32 485 Illuminance
猜你喜欢
『递归』递归概念与典型实例
Algorithms - ones and zeros (Kotlin)
Qt制作18帧丘比特表白意中人、是你的丘比特嘛!!!
University Physics---Particle Kinematics
[cesium] 3D Tileset model is loaded and associated with the model tree
逆向理论知识4
span标签和p标签的区别
大学物理---质点运动学
Use IDEA to connect to TDengine server
The mall background management system based on Web design and implementation
随机推荐
Flutter学习4-基本UI组件
How does the Flutter TapGestureRecognizer work
MySQL Foundation (1) - Basic Cognition and Operation
Distributed systems revisited: there will never be a perfect consistency scheme...
Using QR codes to solve fixed asset management challenges
雷克萨斯lm的安全性到底体现在哪里?一起来看看吧
uboot enable debug printing information
How to deal with DNS hijacking?
Flex layout frog game clearance strategy
[cesium] element highlighting
software management rpm
淘宝账号如何快速提升到更高等级
数字孪生技术在电力系统中的应用现状
flex布局青蛙游戏通关攻略
【cesium】3D Tileset 模型加载并与模型树关联
dedecms dream weaving tag tag does not support capital letters fix
uboot开启调试打印信息
人性的弱点
ESP32 485 Illuminance
Returned object not currently part of this pool