在Hive中进行多表自然连接查询时报如下错误:
FAILED: SemanticException Cartesian products are disabled for safety reasons. If you know what you are doing, please sethive.strict.checks.cartesian.product to false and that hive.mapred.mode is not set to 'strict' to proceed. Note that if you may get errors or incorrect results if you make a mistake while using some of the unsafe features
原因为Hive中开启了严格模式,将其属性设置为false即可。
set hive.strict.checks.cartesian.product=false;