(args, client, connection_args={})
| 87 | |
| 88 | |
| 89 | def get_flight(args, client, connection_args={}): |
| 90 | if args.path: |
| 91 | descriptor = pyarrow.flight.FlightDescriptor.for_path(*args.path) |
| 92 | else: |
| 93 | descriptor = pyarrow.flight.FlightDescriptor.for_command(args.command) |
| 94 | |
| 95 | info = client.get_flight_info(descriptor) |
| 96 | for endpoint in info.endpoints: |
| 97 | print('Ticket:', endpoint.ticket) |
| 98 | for location in endpoint.locations: |
| 99 | print(location) |
| 100 | get_client = pyarrow.flight.FlightClient(location, |
| 101 | **connection_args) |
| 102 | reader = get_client.do_get(endpoint.ticket) |
| 103 | df = reader.read_pandas() |
| 104 | print(df) |
| 105 | |
| 106 | |
| 107 | def _add_common_arguments(parser): |
nothing calls this directly
no test coverage detected