Skip to content
Advertisement

Tag: hiveql

SQL Subquery using where condition

Sorry for my bad english. I want to get HIDESC from M6HI based on HI.HIRECO = RE.RECODE and RE.RECODE is loop from M5RE. Anyone know how to fix it? Answer A Common Table Expression may help you break this down a bit. HiveQL supports CTE’s. Documentation is here: https://cwiki.apache.org/confluence/display/Hive/Common+Table+Expression

Convert from lateral view to case statements in hive

I need to place below code in case statement: I have tried: But getting error. Answer For the provided SQL on table tab1, the actual logic is like: Explode field secondary.tertiary, alias it as lv, which results in a temporary result set (table) tab2; A join-like operation to concatenate tab2’s fields back to rows in tab1, resulting in another intermediate

Generate range hours and range numbres SQL/HQL

I have a problem with a table.I currently have this empty hours table and I need to fill it automatically with a query in Hiveql. The idea is to generate: In the first column “key” values between 000000 and 235959 In the second column “hours” values between 00:00:00 and 23:59:59. Now my table is empty: Future table that I need

Advertisement