课程: Introduction to Spark SQL and DataFrames
今天就学习课程吧!
今天就开通帐号,24,600 门业界名师课程任您挑!
Joining DataFrames with SQL
- [Instructor] One of the most useful features of SQL is the ability to join tables. We can join in Spark SQL as well. So in this case, I've created a new Jupyter notebook and I've loaded our utilization data. And of course, the first thing I will do is I'll create a table for working with this DataFrame using SQL. In this case, I called it df util just to distinguish it from another DataFrame we'll create in a moment. And using df util I will create or replace temp view utilization. Now, I want to do a join, so I'm going to need some additional data. So I'm going to load another file, a file with server names. And so the first thing I'm going to do is specify a path to my data directory and I'll call that cfdf path. And that's going to be the combination of my data path variable plus the file I want to load, which in this case is called server name.csv. And this is included with the exercise files. And then I'll…
随堂练习,边学边练
下载课堂讲义。学练结合,紧跟进度,轻松巩固知识。