While Hive supports positive like queries: ex.
select * from table_name where column_name like 'root~%';
Hive Does not support negative like queries: ex.
select * from table_name where column_name not like 'root~%';
Does anyone know an equivalent solution that Hive does support?
Key differences between Hive and SQL: Architecture: Hive is a data warehouse project for data analysis; SQL is a programming language. (However, Hive performs data analysis via a programming language called HiveQL, similar to SQL.) Set-up: Hive is a data warehouse built on the open-source software program Hadoop.
While SQL Server is built to be able to respond in realtime from a single machine, hive is for processing large data sets that may span hundreds or thousands of machines. Hive (via hadoop) has a lot of overhead for starting up a job. Hive and hadoop will not cache data in memory like sql server does.
Try this:
Where Not (Col_Name like '%whatever%')
also works with rlike:
Where Not (Col_Name rlike '.*whatever.*')
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With