Didn't think of that. It worked. :) Thanks James.

On Tue, Aug 25, 2015 at 1:06 PM, James Taylor <[email protected]>
wrote:

> I suspect you may not being doing a connection.commit() from your JDBC
> client. Sqline runs with autocommit on, but regular Phoenix connections do
> not (unless you set phoenix.connection.autoCommit to true in your
> hbase-sites-xml).
>
> Thanks,
> James
>
> On Tue, Aug 25, 2015 at 12:28 AM, divye sheth <[email protected]>
> wrote:
>
>> Hi Team,
>>
>> I am using phoenix to store data, below are the details of the cluster:
>> Phoenix Version: 4.4.0
>> Hadoop Version: 2.6.0
>> Hbase Version: 0.98
>>
>> I have three tables:
>> 1. Employee table:
>> EmpId
>> Name
>> Address
>>
>> 2. Salary Table:
>> SalId
>> EmpId - Foreign Key
>> Salary
>>
>> 3. Transaction Table: (This is a flat table containing fields combining
>> the above tables)
>> Employee Name
>> Address
>> Salary...
>>
>> Now while populating the Salary table I make use of the salary_seq which
>> I have created using the "CREATE SEQUENCE" command.
>> The query being created is:
>> UPSERT INTO SALARY(SALID, EMPID, SALARY) SELECT NEXT VALUE FOR
>> SALARY_SEQ, EMPID, SALARY FROM TRANSACTION INNER JOIN EMPLOYEE ON (
>> TRANSCATION.EMPLOYEENAME = EMPLOYEE.EMPLOYEENAME )
>>
>> The above query when executed from the sqlline interface inserts records
>> into the SALARY table but when the same is executed from JDBC there are no
>> inserts. I am sure it is to do with SEQUENCE, but cant figure out what is
>> wrong.
>>
>> Why is the sequence not getting incremented with JDBC call to Phoenix?
>> Please let me know if this is an issue, if yes then how can I resolve it.
>> If sequence is not the issue then please help me with giving pointers as to
>> what could be?
>>
>> Thanks
>> Divye Sheth
>>
>>
>>
>

Reply via email to