我有一个查询,使用 talend 从大数据配置单元获取所有数据作为源
这是我通常使用的查询:
SELECT
bd_bt_xyz.xllnis05_timestamp,
bd_bt_xyz.xllnis05_key,
.
. (too many field)
.
bd_bt_xyz.xln_cr_in_un_bl_dt,
bd_bt_xyz.date_pr
FROM newmisplus2.bd_bt_llnis05
LIMIT 1000000
从现在开始我需要修改查询以仅获取 talend 中过去三个月的数据,但我仍然不知道该怎么做。
*注意:字段bd_bt_xyz.date_pr是数据创建日期。
最佳答案
使用过滤器:
where bd_bt_xyz.date_pr >= add_months(current_date, -3)
Talend 中的类似内容:
"select
...
where bd_bt_xyz.date_pr >= '" +TalendDate.addDate(TalendDate.getDate("yyyy-MM-dd"),"yyyy-MM-dd",-3,"MM")+ "'"
关于hive - 使用talend(Big Data Hive)获取最近三个月的数据,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55292664/