我的查询是select count(1) from db.table;
。如何在hiveql脚本中执行此查询并将其设置为hivevar:hive_count
?
有些事情......
> set hivevar:hive_count=(select count(1) from db.table);
> ! echo ${hivevar:hive_count}
43
现在发生这种情况......
> set hivevar:hive_count=(select count(1) from db.table);
> ! echo ${hivevar:hive_count}
(select count(1) from db.table)
未执行查询。我希望能够将查询结果保存到hivevar
,我可以稍后回复