Presto 学习和使用笔记
1.presto 表连接查询的连接条件中不支持使用函数
比如下面的脚本在presto中运行会报错
select t1.period_start_date, t2.statistic_date
from
(select
distinct calendar_date as period_start_date, calendar_date as period_end_date
from
edw_public.dim_esf_edw_pub_date
where calendar_date >= '${开始时间}' and calendar_date <= '${结束时间}'
) t1
left join
(select
statistic_date
,xf_agent_id as agent_id
from
edw_agents.adm_xf_edw_agents_performance_daily_report_edw_001_di
where 1=1
) t2 on date(statistic_date) <= period_start_date and date(statistic_date) <= period_end_date
但是只要把连接条件中的date函数去掉则可以正常运行
select t1.period_start_date, t2.statistic_date
from
(select
distinct calendar_date as period_start_date, calendar_date as period_end_date
from
edw_public.dim_esf_edw_pub_date
where calendar_date >= '${开始时间}' and calendar_date <= '${结束时间}'
) t1
left join
(select
statistic_date
,xf_agent_id as agent_id
from
edw_agents.adm_xf_edw_agents_performance_daily_report_edw_001_di
where 1=1
) t2 on statistic_date <= period_start_date and statistic_date <= period_end_date
Presto 学习和使用笔记的更多相关文章
- hadoop2.5.2学习及实践笔记(二)—— 编译源代码及导入源码至eclipse
生产环境中hadoop一般会选择64位版本,官方下载的hadoop安装包中的native库是32位的,因此运行64位版本时,需要自己编译64位的native库,并替换掉自带native库. 源码包下的 ...
- Python学习的个人笔记(基础语法)
Python学习的个人笔记 题外话: 我是一个大二的计算机系的学生,这份python学习个人笔记是趁寒假这一周在慕课网,w3cschool,还有借鉴了一些博客,资料整理出来的,用于自己方便的时候查阅, ...
- 开始记录学习java的笔记
今天开始记录学习java的笔记,加油
- 菜鸟教程之学习Shell script笔记(上)
菜鸟教程之学习Shell script笔记 以下内容是,学习菜鸟shell教程整理的笔记 菜鸟教程之shell教程:http://www.runoob.com/linux/linux-shell.ht ...
- Presto 学习参考资料
Presto 文档资料: 0.1版:Presto 0.100 Documentation 0.213版:Presto 0.213 Documentation 阿里云 presto 学习资料:https ...
- Presto 学习
Presto 基础知识与概念学习可以参考这些博客: presto 0.166概述 https://www.cnblogs.com/sorco/p/7060166.html Presto学习-prest ...
- hadoop2.5.2学习及实践笔记(四)—— namenode启动过程源码概览
对namenode启动时的相关操作及相关类有一个大体了解,后续深入研究时,再对本文进行补充 >实现类 HDFS启动脚本为$HADOOP_HOME/sbin/start-dfs.sh,查看star ...
- 深度学习Keras框架笔记之AutoEncoder类
深度学习Keras框架笔记之AutoEncoder类使用笔记 keras.layers.core.AutoEncoder(encoder, decoder,output_reconstruction= ...
- 深度学习Keras框架笔记之TimeDistributedDense类
深度学习Keras框架笔记之TimeDistributedDense类使用方法笔记 例: keras.layers.core.TimeDistributedDense(output_dim,init= ...
随机推荐
- ext3文件系统挂载优化--HBase
1.设置noatime属性禁止记录文件访问时间戳以减少内核的管理开销 2.优化磁盘每个块为关键系统进程保留的固定空间:这个功能对关键磁盘比较有用, 比如操作系统依赖的磁盘,但这个功能对于数据存储来说几 ...
- MongoDB与关系型数据库 区别
mysql mongodb 表 table Collection 字段 Colum Fields 行 row Document Mongo中的一些概念 ------------- ...
- 爬虫请求库——selenium
selenium模块 selenium最初是一个自动化测试工具,而爬虫中使用它主要是为了解决requests无法直接执行JavaScript代码的问题.selenium的缺点是效率会变得很慢. sel ...
- MySQL 5.7 新特性大全和未来展望
引用 美图公司数据库高级 DBA,负责美图后端数据存储平台建设和架构设计.前新浪高级数据库工程师,负责新浪微博核心数据库架构改造优化,以及数据库相关的服务器存储选型设计.之前在「高可用架构」发表的&l ...
- Windos上生成密钥,以及添加到GIT
1.下载git //进入官网下载git; https://git-scm.com/download/win 2.配置本地信息 git config --g user.name "wbiokr ...
- pymysql下报错:numpy.float64 object has no attribute 'translate' 可能是pandas版本的问题
pymysql下报错:numpy.float64 object has no attribute 'translate'.定位到db.merge函数中,dataframe中浮点型元素的类型为numpy ...
- drf权限组件
1.简介 设置哪种用户的权限可以做什么事 2.用法 在MyAuth文件编写权限类, from rest_framework.permissions import BasePermission 代码如下 ...
- NgDL:第四周深层神经网络
4.3核对矩阵维数 根据前向的矩阵,可以计算出右上的规律,对于第L层的w来说,其维数为(n[L],n[L-1]),n[L]表示第L层的单元数. 4.4为什么深层神经网络会好用? 如果要做一个人脸识别的 ...
- Laravel传值总结
Laravel传值:with,view(),compact方法一:with public function index() { $title = '文章标题1'; return view('artic ...
- [LeetCode] 98. Validate Binary Search Tree_Medium
Given a binary tree, determine if it is a valid binary search tree (BST). Assume a BST is defined as ...