No partition predicate found for Alias even when the partition predicate in present in the query No partition predicate found for Alias even when the partition predicate in present in the query hadoop hadoop

No partition predicate found for Alias even when the partition predicate in present in the query


This happens because hive is set to strict mode.this allow the partition table to access the respective partition /folder in hdfs .

  set hive.mapred.mode=unstrict;  it will work 


In your query error it is said: No partition predicate found for Alias "inv" Table "pos_inv".

So you must put the where clause for the fields of the partitioned table (for pos_inv), and not for the other one (inv), as you've done.


set hive.mapred.mode=unstrict allows you access the whole data rather than the particular partitons. In some case read whole dataset is necessary, such as: rank() over