generated from r-dbi/RKazam
-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Description
Trying to figure out how to use adbi to get a connection to a Flight SQL server and while able to successfully get a connection against Voltron's sqlflite server - reproducable w containers here, I am stuck on authenticating against another containerized server quackpy.
From python the following can be used to establish a connection against the quackpy Flight SQL server:
from pyarrow.flight import FlightClient, Ticket, FlightCallOptions
sql="""SELECT version()"""
flight_ticket = Ticket(sql)
token = (b"authorization", bytes(f"user:persistence".encode('utf-8')))
options = FlightCallOptions(headers=[token])
client = FlightClient(f"grpc://localhost:8815")
reader = client.do_get(flight_ticket, options)
arrow_table = reader.read_all()From R, using adbi, how do I provide the equivalent "FlightCallOptions" when initiating the connection?
Attempting to provide authentication details through the uri (I might be doing this wrong obviously) I get a server response like below:
./fly.R grpc://user:persistence@localhost:8815/ "from lineitem limit 5;"
Registered S3 methods overwritten by 'adbi':
method from
infer_nanoarrow_schema.AsIs nanoarrow
infer_nanoarrow_schema.list nanoarrow
Error in force(code) :
IO: [FlightSQL] write tcp 127.0.0.1:52716->127.0.0.1:8815: write: broken pipe (Unavailable; AuthenticateBasicToken)
Calls: <Anonymous> ... <Anonymous> -> with_adbc -> force -> stop_for_error
Execution halted
Metadata
Metadata
Assignees
Labels
No labels