Skip to Content
Presto实战
book

Presto实战

by Matt Fuller, Manfred Moser, Martin Traverso
March 2021
Intermediate to advanced
265 pages
6h 50m
Chinese
Posts & Telecom Press
Content preview from Presto实战
14
1
$ presto -f iris-data-set/iris-data-set.sql
USE
CREATE TABLE
INSERT: 150 rows
确认数据可以查询:
$ presto --execute 'SELECT * FROM memory.default.iris;'
"5.1","3.5","1.4","0.2","setosa"
"4.9","3.0","1.4","0.2","setosa"
"4.7","3.2","1.3","0.2","setosa"
...
此外,你还可以使用任何可以连接到
Presto
SQL
管理工具来运行查询,如
3.2
节介绍的
Java
数据库连接(
JDBC
)驱动。
8
章和第
9
章包含一些使用此数据集的查询案例,
6.8
节提供了有关内存连接器的信息。
1.4.8
 航班数据集
与鸢尾花数据集类似,本书后面还将介绍航班数据集的查询案例和使用场景。这一数据集
比鸢尾花数据集复杂,它包含关于航空公司、机场及其他信息的多个查询表,也包含有关
特定航班的业务数据。这使得此数据集适用于使用
Join
操作的更复杂的查询和联邦查询
(其中不同表位于不同的数据源)。
此数据集的数据来自美国联邦航空管理局(
FA
A
),专用于分析。
flights
表的
schema
较大,表
1-1
展示了其中一部分列。
1-1:可用列的子集
flightdate airlineid origin dest arrtime deptime
数据集中的每一行表示从美国机场起飞或到达美国机场的航班。
1.5
 
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

大数据项目管理:从规划到实现

大数据项目管理:从规划到实现

Ted Malaska, Jonathan Seidman
Google系统架构解密: 构建安全可靠的系统

Google系统架构解密: 构建安全可靠的系统

Heather Adkins, Betsy Beyer, Paul Blankinship, Piotr Lewandowski, Ana Oprea, Adam Stubblefield

Publisher Resources

ISBN: 9787115560056