使用talend(Big Data Hive)获取最近三个月的数据

Get data in the last three months using talend (Big Data Hive)

我有一个查询要使用 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")+ "'"