Apply try catch in hive

hadoop, hive

Solution

HiveQL does not support the `try catch` construct.

Problem

I tried using the try-catch block statement of SQL but it is giving an error in hive. I looked out for documentation too but to no avail. So how can I apply try-catch statement blocks in a hive script?? Syntax i tried ``` BEGIN TRY { sql_statement | statement_block } END TRY BEGIN CATCH [ { sql_statement | statement_block } ] END CATCH [ ; ] ``` taken from http://msdn.microsoft.com/en-IN/library/ms175976.aspx

Original source