Skip to content
Advertisement

Tag: hql

Hive Case Resulting Duplicate Row

I have a table containing contact numbers and another reference table containing a “length” variable and a number column. What I need is to find the prefix name where the prefix of the number matches …

insert if not exists in HQL

I am trying to write a query in HQL which can insert a record if it does not exists (with same name) so that there is no duplicate insertion when done from multiple threads. However, the record is not inserted. I suspect this is because the table is empty and the subquery returns 0 records despite the NOT EXISTS clause.

Advertisement