I am using phoenix as dataSource for data models, while update ,statement which executes is like 'update table SET =? where ID= ?' , instead i want it to execute Upsert statement over phoenix to query Hbase. Please Help!!

cancel
Showing results for 
Search instead for 
Did you mean: 
dharamjeet
Active Member II

I am using phoenix as dataSource for data models, while update ,statement which executes is like 'update table SET =? where ID= ?' , instead i want it to execute Upsert statement over phoenix to query Hbase. Please Help!!

I am using phoenix as dataSource for data models in alfresco activiti, while update ,statement which executes is like 'update table SET =? where ID= ?' , instead i want it to execute Upsert statement over phoenix to query Hbase. Also HBase uses column family with column name, If I map my variable with the table columns having column family in data model in activiti,it throws BAD SQL Grammar exception. Please Help!!#

3 Replies
gdharley
Intermediate

Re: I am using phoenix as dataSource for data models, while update ,statement which executes is like 'update table SET =? where ID= ?' , instead i want it to execute Upsert statement over phoenix to query Hbase. Please Help!!

Not sure I understand what you are trying to do.

Can you provide a scenario and unit test?

Thanks,

Greg

dharamjeet
Active Member II

Re: I am using phoenix as dataSource for data models, while update ,statement which executes is like 'update table SET =? where ID= ?' , instead i want it to execute Upsert statement over phoenix to query Hbase. Please Help!!

https://community.alfresco.com/community/bpm/blog/2016/11/17/activiti-enterprise-developer-series-cu...

This helped me.

what I wanted to do is to map my data model with my database, I defined the dataSource for my data model ,but It as internally creating queries internally and I wanted to execute my custom query since I had to execute an upsert statement. so what I did is defined custom model and implemented AlfrescoCustomDataModel Service.

gdharley
Intermediate

Re: I am using phoenix as dataSource for data models, while update ,statement which executes is like 'update table SET =? where ID= ?' , instead i want it to execute Upsert statement over phoenix to query Hbase. Please Help!!

Glad to hear it, the developer series blog posts are very good and certainly worth following.

Regards,

Greg