Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Does CREATE FUNCTION supports IF NOT EXIST

Does CREATE FUNCTION supports IF NOT EXIST

New Contributor

I am trying to do a check, where I will create a function from UDF, only in case if the function doesnot exist in the database.

CREATE FUNCTION IF NOT EXIST <Function Name> AS 'com.hive.udf.UUIDGenerator' USING JAR 'hdfs:/apps/jars/apps-1.0.jar';

I am getting the below error:

  • Error while compiling statement: FAILED: ParseException line 1:16 cannot recognize input near 'IF' 'NOT' 'EXIST' in function identifier
1 REPLY 1
Highlighted

Re: Does CREATE FUNCTION supports IF NOT EXIST

New Contributor

Same problem here on an Azure HDInisght cluster. Looks like it is not supported!