Hey Tanveer,

Something like this should work:

$ python examples/flight/client.py put localhost:1234 foo.csv
File Name: foo.csv
Table rows= 1
   a  b
0  1  2
$ python examples/flight/client.py get localhost:1234 -p foo.csv
Ticket: <Ticket b"(1, None, (b'foo.csv',))">
<Location b'grpc+tcp://localhost:1234'>
   a  b
0  1  2

Note that Flight itself does not implement SQL query functionality or
anything of the sort. It is a common misconception, I think
exacerbated since Flight is often discussed in the context of products
like Dremio which implement such functionality on top of Flight. But
really, Flight itself is just a 'dumb pipe' for Arrow data for
building such systems.

You may be interested in the FlightSQL proposal which defines at least
an interface for database systems to make themselves available over
Flight and for clients to generically query them. However that
proposal has been stalled for a while.

Best,
David

On 2021/05/15 12:15:26, Tanveer Ahmad - EWI <t.ah...@tudelft.nl> wrote: 
> Hi all,
> 
> 
> For Python Flight 
> example<https://github.com/apache/arrow/tree/master/python/examples/flight>, 
> I can start server (python server.py -> Serving on grpc+tcp://localhost:5005) 
> and client can put (python client.py put localhost:5005 mycsv.csv) and also 
> get (python client.py get localhost:5005 -p mycsv.csv) command retrieves data 
> with -p (path) option.
> 
> 
> I am wondering how to query (like python client.py get localhost:5005 -c 
> "select * from ? limit 10") using -c, command this data , which I had already 
> put on server through put command.
> 
> 
> Thanks.
> 
> Regards,
> Tanveer Ahmad
> 
> 

Reply via email to