Reply
Explorer
Posts: 11
Registered: ‎07-28-2016

Fastconnect problem for sqlline.py for connecting to Apache Phoenix

I want to give sqlline command to connect to Apache Phoenix.

in the file fastconnect parameter is set to false... And I do not want to change it.

However, for adhoc select query operations, I want to make it true while connecting...

How can I do that?

Or, do I have to compulsorily change the sqlline.py file?

Posts: 1,903
Kudos: 435
Solutions: 305
Registered: ‎07-31-2013

Re: Fastconnect problem for sqlline.py for connecting to Apache Phoenix

Given that its currently hardcoded into Phoenix's sqlline.py file, your
only resort would be to maintain a duplicate modified copy of the
sqlline.py (or use the evaluated java sqlline command directly) where you
have the option set differently.
Explorer
Posts: 11
Registered: ‎07-28-2016

Re: Fastconnect problem for sqlline.py for connecting to Apache Phoenix

If I make another copy of sqlline.py file , lets say sqlline1.py and change value of fastconnect as true in it... And call it for those adhoc operations, can it work?

 

And Do I need any other configurations changes?

 

 

Also,

 

Can you please explain, how can I use the evaluated java sqlline command directly?

Highlighted
Posts: 1,903
Kudos: 435
Solutions: 305
Registered: ‎07-31-2013

Re: Fastconnect problem for sqlline.py for connecting to Apache Phoenix

Yes a duplicate will work as long as you're calling it in the same way.

As to using the evaluated java command, you can for example print the
command out from sqlline.py to see the final built command and then use
that directly (outside of python). This may not be necessary to do though,
since duplicating the sqlline.py is an easier way to the same thing. I
suggested this so you have fuller control on the SQLLine directly, if you
need that.