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= ...
随机推荐
- winform创建快捷方式
/// <summary> /// 创建快捷方式 /// </summary> public class Lnk { /// <summary> /// 创建快捷方 ...
- php 数值类型
一.整形 1. 常见的整形 echo 1234; // 十进制数 echo -123; // 负数 echo 0123; // 八进制数 (等于十进制 83) echo 0x1A; // 十六进制数 ...
- Entity Framework学习 - 5.DB First执行时提示model没有key
原因:自动生成的类中有关联主键,没有自动生成Key及Column 解决方法:在xxx.tt的66行左右修改为 var simpleProperties = typeMapper.GetSimplePr ...
- 理解Spark里的闭包
版权声明:本文为博主原创文章,未经博主同意不得转载. https://blog.csdn.net/rlnLo2pNEfx9c/article/details/80650309 闭包的概念例如以下图: ...
- 20170811 JQuery基础知识学习记录(一)
基本写法 $(selector).action() $(this).hide() - 隐藏当前元素 $("p").hide() - 隐藏所有 <p> 元素 $(&quo ...
- Centos的yum源更换为国内的阿里云源
1.备份 mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup 2.下载新的CentOS-Base ...
- 001-RESTful服务最佳实践-RestFul准则、HTTP动词表示含义、合理的资源命名、响应格式XML和JSON
一.概述 因为REST是一种架构风格而不是严格的标准,所以它可以灵活地实现.由于这种灵活性和结构自由度,对设计最佳实践也有很大的差异. API的方向是从应用程序开发人员的角度考虑设计选择. 幂等性 不 ...
- 初学git
初学git,总结了一点东西,可能有理解和操作的不到位的地方,还有就是这个是我之前写在word上的,因为CSDN上不能直接上传,所以拷贝的过程中也可能有其他问题.发的的朋友还望指正... 1.找到“参与 ...
- Oracle下SQL学习笔记
主机字符串:as sysdba alter user scott account unlock;//解锁scott,不会就谷歌检索 DML语句,增.删.查.改 select语句:熟悉表结构 desc ...
- 模仿以太坊 ERC20 规范的 Hyperledger Fabric 实现 Token 通证
合约: package main /* -------------------------------------------------- Author: netkiller <netkill ...