【Presto基础】01 基础知识

目录

1. 概述

参考:

  1. 深入浅出Presto:PB级OLAP引擎–知乎
  2. Trino学习总结–SparkSQL比较==>很好

1.1. Trino

1.1.1. 概述

  1. 名字由来

    It was inspired from neutrinos (subatomic particles), which are light and travel very fast. 
    And then we made the name smaller by shortening it to trino.  --中微子
         --<PrestoSQL 项目更名为 Trino,彻底和 PrestoDB 分家 >
    
  2. Trino是什么?

    1. Trino 是一个 MPP(大规模并行处理) 架构的内存型 OLAP 引擎,注意它只是一个查询引擎,
      1. 并不是一个数据库,因为 Trino 不存储数据。通过 connector 机制可以获取多种数据源的数据,
      2. 比如 Trino-hive 这个 connector 就可以获取到 Hive 表的数据。
    2. Trino 主要适用于 Adhoc 查询(即席查询),主要应用场景是数据分析,你可以根据自己的需求写 SQL,查询任何你想查询的数据(前提是你得有权限[手动狗头])。
    3. Trino 是一个典型的 Master-Slave (主从)架构的计算框架,负责接收用户请求的是 Coordinator,干苦力活的叫 worker

2. 简单使用


2.1. 启停

  • 启停命令
    == coordinator的启停控制:
    bin/launcher start --config=etc/config-coordinator.properties
    bin/launcher stop
    bin/launcher restart --config=etc/config-coordinator.properties
    bin/launcher status -v
     
    == worker的启停控制:
    bin/launcher start --config=etc/config-worker.properties
    bin/launcher stop
    bin/launcher restart --config=etc/config-worker.properties
    bin/launcher status -v
    

3. 数据类型


3.1. 日期类型

3.1.1. 类型


timestamp with time zone

3.1.2. 日期函数

参考:

  1. presto: Data Types
  2. presto: Date and Time Functions and Operators
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值