Convert PL/SQL to Hive QL

前端 未结 2 1340
梦如初夏
梦如初夏 2020-12-21 04:01

I want a tool through which I can get the respective hive query by giving the PL/SQL query. There are lots of tools available which convert sql to hql. ie: taod for cloude d

相关标签:
2条回答
  • 2020-12-21 04:25

    Please take a look at open-source project PL/HQL at http://www.hplsql.org/ which is now a part of Hive 2.x or higher version. It allows you to run existing SQL Server, Oracle, Teradata, MySQL etc. stored procedures in Hive.

    0 讨论(0)
  • 2020-12-21 04:30

    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.

    0 讨论(0)
提交回复
热议问题