Skip to content
Advertisement

How to prevent sql without limit in Hive?

Many users are used to using ‘select * from tables’ in oracle/mysql

But i should not allow them to query like that in hive

Is there any way to prevent a full_table scan in hive?

Like trigger or somethng else?

Thanks a lot!

Advertisement

Answer

To prevent full table scan use these settings.

Hive will generate exception if partition predicate is not specified:

And exception example in case the number of partitions exceeded:

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement