Convert PL/SQL to Hive QL

人盡茶涼 提交于 2019-11-29 14:31:34

Please take a look at open-source project PL/HQL at http://www.plhql.org. It allows you to run existing SQL Server, Oracle, Teradata, MySQL etc. stored procedures in Hive.

shiva kumar s

Ratan, I did not how to start responding. So, lets start like this. I think you checked toad and thinking like there is a tool to convert SQL to hive QL. I do not think there is such a tool.

Let me clarify like this, HIVE QL, is same as SQL. Check this links before you are trying to write some queries:

https://cwiki.apache.org/confluence/display/Hive/LanguageManual,

https://cwiki.apache.org/confluence/display/Hive/LanguageManual+UDF.

This is simple to understand if you know sql and simple to write (as you check the HIve ql).

Hive doesnot have many operators the sql supports. For example:

select * from sales where country like 'EU~%'; "HIVE SUPPORTS LIKE"

But try this negative queries as we write in SQL :

select * from sales where country not like 'EU~%'; "HIVE DOES NOT SUPPORT"

This is just one example, I remember. There are more like this. But to deal with these hive has many like "where not" etc.

If your question is does the Hive have any PL/SQL support. Straight answer is no. But, we can check the UDF in hive and also, the PIG on Hadoop.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!