Read about temporary tables at
https://cwiki.apache.org/confluence/display/Hive/LanguageManual+DDL#LanguageManualDDL-TemporaryTables
and decide whether you need them or not :)

Volatile is a just syntax support for compatibility with Teradata.

Thanks,
Dmitry

On Mon, Oct 2, 2017 at 2:17 AM, Srinivas Alavala <srinivas.alav...@rcggs.com
> wrote:

> Hi Dmitry,
>
> I am trying to understand the use cases for Temporary and Volatile tables.
> Can I write the updated bulk data in them and create a new hive table at
> the end? I guess I can use spark to do the ETL if hplsql is NOT the right
> tool.
>
> Thanks & Regards,
> Srini Alavala
>
> -----Dmitry Tolpeko <dmtolp...@gmail.com> wrote: -----
> To: Srinivas Alavala <srinivas.alav...@rcggs.com>
> From: Dmitry Tolpeko <dmtolp...@gmail.com>
> Date: 10/01/2017 03:19AM
> Cc: user@hive.apache.org
> Subject: Re: Hplsql Cursor Loop Java Error - Resolved
>
> Thanks! It should not throw NPE anyway, I will create a ticket for
>
> Exception in thread "main" java.lang.NullPointerException
>         at org.apache.hive.hplsql.Select.getIntoCount(Select.java:405)
>
> Thanks,
> Dmitry
>
> On Sun, Oct 1, 2017 at 1:43 AM, Srinivas Alavala <
> srinivas.alav...@rcggs.com> wrote:
>
>>
>> I forgot to add the END LOOP statement. It is working fine.
>>
>> Thanks,
>> Srini Alavala
>>
>> -----Srinivas Alavala/RCGIT wrote: -----
>> To: user@hive.apache.org
>> From: Srinivas Alavala/RCGIT
>> Date: 09/30/2017 05:37PM
>> Cc: dmtolp...@gmail.com
>> Subject: Hplsql Cursor Loop Java Error
>>
>> Hi Guys,
>>
>> I am very excited about hplsql. I have started writing code in Cloudera
>> CDH 5.12.X environment with Kerberos security. I am getting jave error
>> while I am trying to execute Cursor loop statement as shown below. How do I
>> troubleshoot this error? Trace didn't show much info.
>>
>> I want to find out if this is production ready. Please guide us.
>>
>>
>> CREATE PROCEDURE getPromoteList(IN position STRING, OUT status STRING)
>> BEGIN
>>
>> FOR cur IN
>> (SELECT customer_cid, customer_first_name FROM Table_Name where
>> prowess_period_id=201601 and customer_pay_title = 'Value')
>> LOOP
>>         DBMS_OUTPUT.PUT_LINE(cur.customer_cid);
>> END;
>>
>> DECLARE status STRING;
>> CALL getPromoteList(201601,status);
>> PRINT status;
>>
>>
>> Ln:1 CREATE FUNCTION hello
>> Ln:1 CREATE PROCEDURE getPromoteList
>> Ln:10 DECLARE status STRING
>> Ln:11 EXEC PROCEDURE getPromoteList
>> Ln:11 SET PARAM position = 201601
>> Ln:11 SET PARAM status = null
>> Ln:5 SELECT
>> Ln:5 ************************************************************
>> ****************
>> [main] INFO org.apache.hive.jdbc.Utils - Supplied authorities:
>> *****************
>> [main] INFO org.apache.hive.jdbc.Utils - Resolved authority:
>> ************************
>> [main] WARN org.apache.hadoop.util.NativeCodeLoader - Unable to load
>> native-hadoop library for your platform... using builtin-java classes where
>> applicable
>> Open connection: j*****************************
>> ************************************
>> Starting query
>> Query executed successfully (38.97 sec)
>> Ln:5 SELECT completed successfully
>> Exception in thread "main" java.lang.NullPointerException
>>         at org.apache.hive.hplsql.Select.getIntoCount(Select.java:405)
>>         at org.apache.hive.hplsql.Select.select(Select.java:88)
>>         at org.apache.hive.hplsql.Exec.visitSelect_stmt(Exec.java:1021)
>>         at org.apache.hive.hplsql.Exec.visitSelect_stmt(Exec.java:52)
>>         at org.apache.hive.hplsql.HplsqlParser$Select_stmtContext.
>> accept(HplsqlParser.java:15050)
>>         at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visitChil
>> dren(AbstractParseTreeVisitor.java:70)
>>         at org.apache.hive.hplsql.Exec.visitStmt(Exec.java:1013)
>>         at org.apache.hive.hplsql.Exec.visitStmt(Exec.java:52)
>>         at org.apache.hive.hplsql.HplsqlParser$StmtContext.accept(
>> HplsqlParser.java:1023)
>>         at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visitChil
>> dren(AbstractParseTreeVisitor.java:70)
>>         at org.apache.hive.hplsql.HplsqlBaseVisitor.visitBlock(HplsqlBa
>> seVisitor.java:28)
>>         at org.apache.hive.hplsql.HplsqlParser$BlockContext.accept(
>> HplsqlParser.java:454)
>>         at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visitChil
>> dren(AbstractParseTreeVisitor.java:70)
>>         at org.apache.hive.hplsql.Exec.visitBegin_end_block(Exec.java:
>> 930)
>>         at org.apache.hive.hplsql.Exec.visitBegin_end_block(Exec.java:52)
>>         at org.apache.hive.hplsql.HplsqlParser$Begin_end_blockContext.
>> accept(HplsqlParser.java:549)
>>         at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visitChil
>> dren(AbstractParseTreeVisitor.java:70)
>>         at org.apache.hive.hplsql.HplsqlBaseVisitor.visitProc_block(
>> HplsqlBaseVisitor.java:56)
>>         at org.apache.hive.hplsql.HplsqlParser$Proc_blockContext.
>> accept(HplsqlParser.java:756)
>>         at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visit(Abs
>> tractParseTreeVisitor.java:42)
>>         at org.apache.hive.hplsql.functions.Function.visit(Function.
>> java:754)
>>         at org.apache.hive.hplsql.functions.Function.execProc(Function.
>> java:244)
>>         at org.apache.hive.hplsql.Exec.visitCall_stmt(Exec.java:1797)
>>         at org.apache.hive.hplsql.Exec.visitCall_stmt(Exec.java:52)
>>         at org.apache.hive.hplsql.HplsqlParser$Call_stmtContext.accept(
>> HplsqlParser.java:3191)
>>         at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visitChil
>> dren(AbstractParseTreeVisitor.java:70)
>>         at org.apache.hive.hplsql.Exec.visitStmt(Exec.java:1013)
>>         at org.apache.hive.hplsql.Exec.visitStmt(Exec.java:52)
>>         at org.apache.hive.hplsql.HplsqlParser$StmtContext.accept(
>> HplsqlParser.java:1023)
>>         at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visitChil
>> dren(AbstractParseTreeVisitor.java:70)
>>         at org.apache.hive.hplsql.HplsqlBaseVisitor.visitBlock(HplsqlBa
>> seVisitor.java:28)
>>         at org.apache.hive.hplsql.HplsqlParser$BlockContext.accept(
>> HplsqlParser.java:454)
>>         at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visitChil
>> dren(AbstractParseTreeVisitor.java:70)
>>         at org.apache.hive.hplsql.Exec.visitProgram(Exec.java:920)
>>         at org.apache.hive.hplsql.Exec.visitProgram(Exec.java:52)
>>         at org.apache.hive.hplsql.HplsqlParser$ProgramContext.accept(
>> HplsqlParser.java:395)
>>         at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visit(Abs
>> tractParseTreeVisitor.java:42)
>>         at org.apache.hive.hplsql.Exec.run(Exec.java:775)
>>         at org.apache.hive.hplsql.Exec.run(Exec.java:751)
>>         at org.apache.hive.hplsql.Hplsql.main(Hplsql.java:23)
>>
>>
>

Reply via email to