phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Srinivas Tirupati (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (PHOENIX-2320) Not able to run upsert query over phoenix query server.
Date Thu, 07 Apr 2016 00:30:25 GMT

    [ https://issues.apache.org/jira/browse/PHOENIX-2320?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15229421#comment-15229421
] 

Srinivas Tirupati commented on PHOENIX-2320:
--------------------------------------------

I guess this link has the information you are asking for 

https://azure.microsoft.com/en-us/documentation/articles/hdinsight-component-versioning/

I just want to track the change which added the requirement of creating a statement explicitly
to run a query. 

> Not able to run upsert query over phoenix query server.
> -------------------------------------------------------
>
>                 Key: PHOENIX-2320
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-2320
>             Project: Phoenix
>          Issue Type: Wish
>            Reporter: Appasaheb Sawant
>            Assignee: Josh Elser
>
> Not able to run upsert query over phoenix query server. Select query works but for upsert
query records are not inserted into phoenix.
> This is CODE
> <?php
> $ch = curl_init();
> curl_setopt($ch, CURLOPT_URL,"http://localhost:8765/");
> curl_setopt($ch, CURLOPT_POST, true);
> curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
> $headers = array();
> // For Select.
> //$headers[] = 'request: {"request":"prepareAndExecute","connectionId":"aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa","sql":"select
* from BLOG.POST"}';
> // For Upsert.
> $headers[] = 'request: {"request":"prepareAndExecute","connectionId":"aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa","sql":"UPSERT
INTO BLOG.POST (POST_ID,TITLE,CONTENT) values (\'aa11111\',\'Test Title\',\'this is test post
content\')"}';
> curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
> $server_output = curl_exec ($ch);
> curl_close ($ch);
> OUTPUT
>  {"response":"Service$ExecuteResponse","results":[{"response":"resultSet","connectionId":"aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa","statementId":1164383384,"ownStatement":false,"signature":null,"firstFrame":null,"updateCount":1}]}
> But record is not inserted ...



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message