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= ...
随机推荐
- scp & cat远程文件操作
对拷文件夹 (包括文件夹本身) scp -r /home/wwwroot/www/charts/util root@192.168.1.65:/home/wwwroot/limesurvey_back ...
- 微信即将支持App直接打开小程序
“今年,微信将更快速地支持各APP直接打开小程序.”微信开放平台基础部高级产品经理林兴表示.对于官方即将支持的App直接打开小程序,林兴解释说,正如大家都喜欢微信钱包里的各种便捷服务,以后一个旅游攻略 ...
- AppState使用
AppState使用 import React, { Component } from 'react'; import {AppRegistry,StyleSheet,Text,View,AppSta ...
- Let Encrypt延期(转自虞大胆的叽叽喳喳)
前几天发现我的 letsencrypt 通配符证书快过期了,想为这两张证书续期(renew). 首先运行命令查看我的所有证书: $ certbot-auto certificates 其中证书名 si ...
- xxx.app已损坏,打不开.你应该将它移到废纸篓-已解决
到这种情况可能不是你的软件包的问题,可能是macos安全设置问题. 解决办法就是: 1.系统偏好设置... -> 安全性与隐私-->修改为任何来源 2.serria里面没有“任何来源”这一 ...
- 常用的Lunix命令 记录
使用normal模式下的 v命令,进入visual模式,v+ j/k/h/l 进行文本选中 对于选中的文本进行如下按键: (1.1)d ------ 剪切操作 (1.2)y ------ ...
- 使用github(一)
一.使用Github(目的.基本概念) 1.目的 借助github托管项目代码 2.基本概念 (1)仓库(Repository) 仓库即项目的意思,你想在github上开源一个项目,那就必须要新建一个 ...
- cocos2d-x C++ 原始工程引擎运行机制解析
新建一个工程,相信感兴趣的同学都想知道cocos引擎都是如何运行的 想知道是如何运行的,看懂四个文件即可 话不多说,上代码: 1.首先解释 AppDelegate.h #ifndef _APP_DEL ...
- cocos2dx 3.x(纯代码实现弹出对话框/提示框/警告框)
头文件: // // PopAlertDialog.h // macstudycocos2dx // // Created by WangWei on 15/6/8. // // #ifndef ...
- 使用Github进行代码管理
准备: Github地址:https://github.com 注册Github帐号 一.新建仓库 进入如下界面: 到这里仓库就创建完成了. 二.安装Github-window-desktop 安装g ...