How to do iterations in HiveQL? if there is no way to implement a loop, is there a GOTO kind of statement?
I need to perform execution four times with four parameter values, one iteration for each. Is there way to do this without using script?
CodePudding user response:
You could use SparkSQL or any other Hive client in a language that supported procedural express expressions, and have both options. HiveQL alone offers neither.
CodePudding user response:
Perhaps you can look at HPL/SQL, which is available in Apache Hive version 2.0 and higher (HIVE JIRA-11055).
HPL/SQL is an open source tool (Apache License 2.0) that implements procedural SQL language for Apache Hive, SparkSQL, Impala as well as any other SQL-on-Hadoop implementation, any NoSQL and any RDBMS.