phoenix-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Terrell <>
Subject Re: Phoenix Query Server Avatica Upsert
Date Fri, 05 Feb 2016 21:07:34 GMT
Thanks, Lukas.  Half the battle is won, now.  With your help I was able to
see the JSON used to perform the upsert.  Looks like my problem was that I
was not doing any "connectionSync" calls.  I had played around with the
"createStatement" before my upsert SQL, but I may not have stumbled across
the proper sequence.

It would have been nice if somewhere there were Avatica docs to let people
know what the sequence of calls must be.  For example:  first you do
connectionSync, second you do createStatement, then you
do prepareAndExecute, etc.

I'll try your tip for starting the 4.7 server in JSON mode sometime soon.

On Fri, Feb 5, 2016 at 1:59 PM, Lukáš Lalinský <> wrote:

> On Fri, Feb 5, 2016 at 8:46 PM, Steve Terrell <>
> wrote:
>> When I tried to send a "createStatement" via curl and via Lukas's
>> phoenixdb, I got these error's respectively:
>> <h2>HTTP ERROR: 500</h2>
>> <p>Problem accessing /. Reason:
>> <pre>    Cannot find parser for </pre></p>
>>   File "/usr/local/lib/python2.7/site-packages/phoenixdb/",
>> line 100, in parse_error_page
>>     raise errors.InternalError(message)
>> phoenixdb.errors.InternalError: ('Cannot find parser for', None, None,
>> None)
>> Too bad - I think I need 4.7 to pass JSON in the HTTP request body.
> 4.7 uses Protobuf3 serialization by default, but you can still make it use
> ./bin/ start -Dphoenix.queryserver.serialization=JSON
>> However, I *was* able to get phoenixdb working with my Phoenix 4.6, both
>> selects and upserts, both locally and remotely.  So, I'd like to take
>> Lukas's advice and log what is being sent so I can replicate it outside of
>> Python.
>> Does anyone know:
>>    - How to log the headers and body of all requests
>> You should be able to run this and see the request/response details.
> ./examples/ --debug http://localhost:8765/
>>    - Where the Avatica documentation is for how to make queries for
>>    different versions?  As I linked in my original email, all I could find was
>>    syntax of the latest JSON, bit no docs on headers, post body, how to form
>>    the HTTP request, etc.
>> There is no documentation for the older versions of the protocol, as far
> as I know. I based my library on the Java code in calcite.
> Lukas

View raw message