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= ...
随机推荐
- javascript面向对象中继承实现?
面向对象的基本特征有:封闭.继承.多态. 在javascript中实现继承的方法: 1.原型链(prototype chaining) 2.call()/apply() 3.混合方式(prototyp ...
- C#-1-2-C#基础
1-注释符 1).单行注释符:// 2).多行注释符:/**/ 3).文档注释符:// 2-常用快捷键 3-变量类型 4-转义字符 5-语句 1.将相应内容打印到控制台:Console.WriteLi ...
- IGMP协议
IGMP报文格式: 4bit的IGMP版本(1)+4bit的IGMP类型(1-2)+8bit未用+16bit检验和(同ICMP)+32bit组地址(D类IP地址) 类型为1说明是由多播路由器发出的查询 ...
- jquery的widget源代码剖析
dialog_obj(别名): Widget_obj(别名): 调用widget方法 $.widget("ui.dialog",dialog_obj); // jquery.ui. ...
- 各版本系统安装tesseract-ocr
Mac版本 1.tesseract-ocr安装 brew install tesseract-ocr 注意:如果未安装brew命令,可以输入命令: brew官网:http://brew.sh /us ...
- 报错解决——DateTimeField *** received a naive datetime (***) while time zone support is active
这是一个跟时区有关的问题,报错中说到datetime字段得到一个naive datetime,而不是支持time zone的active datetime由于Django的设置中米哦人USE_TZ设置 ...
- 如何在Digital Ocean上申请服务器的教程
本文会详细叙述如何在digital ocean上注册.申请.创建以及配置服务器,亲测有效. what's the Digital Ocean ? 根据度娘释义,Digital Ocean是digita ...
- 八种排序算法--java实现(转)
(转:http://blog.csdn.net/without0815/article/details/7697916) 8种排序之间的关系: 1, 直接插入排序 (1)基本思想:在要排序的一组数中, ...
- vue 动态绑定背景图片
html <div class="racetm" :style="{backgroundImage: 'url(' + (coverImgUrl ? coverIm ...
- Lua获取当前时间
更多好的文章就在 blog.haoitsoft.com,请大家多多支持! local getTime = os.date(“%c”); 其中的%c可以是以下的一种:(注意大小写) %a abbrevi ...