Hive 配置单元与where查询联接

Hive 配置单元与where查询联接,hive,Hive,我基本上希望将我的商店产品主列表与包含所有可能日期的日历表交叉连接。但是,在加入主列表之前,我想过滤一年365天 我正在尝试以下查询- select * from ( select a.store_id,a.product_id from mez_2018_store_product_lst) a cross join (select b.day_id,cast(to_date(from_unixtime(unix_timestamp(b.day_date, 'yyyy-MM-dd'))) as

我基本上希望将我的商店产品主列表与包含所有可能日期的日历表交叉连接。但是,在加入主列表之前,我想过滤一年365天

我正在尝试以下查询-

select * from ( select a.store_id,a.product_id from mez_2018_store_product_lst) a cross join
(select b.day_id,cast(to_date(from_unixtime(unix_timestamp(b.day_date, 'yyyy-MM-dd'))) as b.date from calendar where day_id>=20170101 and day_id<=20180101 ) b
而且我不断地得到EOF错误。 你们能帮忙吗?

试试下面的查询:

 hive> select * from 
 (select store_id,
    product_id from mez_2018_store_product_lst) a 
 cross join
(select day_id,
    to_date(from_unixtime(unix_timestamp(day_date, 'yyyy-MM-dd')))dt from calendar 
    where day_id>=20170101 and day_id<=20180101 ) b;