From cbc7c485a8f35176345a1c671ad59975165af977 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E7=BD=97=E7=A5=A5?= <1366971433@qq.com>
Date: Thu, 23 May 2019 16:52:31 +0800
Subject: [PATCH] modify
---
notes/Spark_Structured_API的基本使用.md | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/notes/Spark_Structured_API的基本使用.md b/notes/Spark_Structured_API的基本使用.md
index 69ab3d1..50916f8 100644
--- a/notes/Spark_Structured_API的基本使用.md
+++ b/notes/Spark_Structured_API的基本使用.md
@@ -113,6 +113,8 @@ val deptDF = spark.createDataFrame(rowRDD, schema)
deptDF.show()
```
+
+
### 1.4 DataFrames与Datasets互相转换
Spark提供了非常简单的转换方法用于DataFrames与Datasets互相转换,示例如下:
@@ -168,7 +170,7 @@ df.withColumnRenamed("comm", "common").show()
需要说明的是新增,删除,重命名列都会产生新的DataFrame,原来的DataFrame不会被改变。
-
+
## 三、使用Structured API进行基本查询
@@ -192,7 +194,7 @@ df.select("deptno").distinct().show()
df.groupBy("deptno").count().show()
```
-
+
## 四、使用Spark SQL进行基本查询