You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hive.apache.org by Keith Wiley <kw...@keithwiley.com> on 2012/08/06 20:06:03 UTC

drop table: no err on nonexistant table?

I'm wrapping hive in a web tool and would like to do some basic error-checking.  If an attempt is made to drop a table that doesn't exist, I would like to show an error message.  The problem is, hive doesn't seem to produce any sort of error when dropping a table that doesn't exists.  Furthermore, if hive is run on the command line (-e) it doesn't return an error status.  Therefore, I think the only way to detect such an error is to actually inspect the table list (show tables) and manually see if the drop attempt will find a corresponding table.

Can I get an error of some sort on this or is it not possible?

Thank you.

________________________________________________________________________________
Keith Wiley     kwiley@keithwiley.com     keithwiley.com    music.keithwiley.com

"I do not feel obliged to believe that the same God who has endowed us with
sense, reason, and intellect has intended us to forgo their use."
                                           --  Galileo Galilei
________________________________________________________________________________


Re: drop table: no err on nonexistant table?

Posted by Keith Wiley <kw...@keithwiley.com>.
Oye, got it.  Sorry.

RTFM: hive.exec.drop.ignorenonexistent

On Aug 6, 2012, at 11:06 , Keith Wiley wrote:

> I'm wrapping hive in a web tool and would like to do some basic error-checking.  If an attempt is made to drop a table that doesn't exist, I would like to show an error message.  The problem is, hive doesn't seem to produce any sort of error when dropping a table that doesn't exists.  Furthermore, if hive is run on the command line (-e) it doesn't return an error status.  Therefore, I think the only way to detect such an error is to actually inspect the table list (show tables) and manually see if the drop attempt will find a corresponding table.
> 
> Can I get an error of some sort on this or is it not possible?
> 
> Thank you.
> 
> ________________________________________________________________________________
> Keith Wiley     kwiley@keithwiley.com     keithwiley.com    music.keithwiley.com
> 
> "I do not feel obliged to believe that the same God who has endowed us with
> sense, reason, and intellect has intended us to forgo their use."
>                                           --  Galileo Galilei
> ________________________________________________________________________________
> 


________________________________________________________________________________
Keith Wiley     kwiley@keithwiley.com     keithwiley.com    music.keithwiley.com

"And what if we picked the wrong religion?  Every week, we're just making God
madder and madder!"
                                           --  Homer Simpson
________________________________________________________________________________