@@ 98-113 (lines=16) @@ | ||
95 | writer.close() |
|
96 | ||
97 | ||
98 | def get_flight_by_path(path, client, connection_args={}): |
|
99 | descriptor = pyarrow.flight.FlightDescriptor.for_path(path) |
|
100 | ||
101 | info = client.get_flight_info(descriptor) |
|
102 | for endpoint in info.endpoints: |
|
103 | print('Ticket:', endpoint.ticket) |
|
104 | for location in endpoint.locations: |
|
105 | print(location) |
|
106 | get_client = pyarrow.flight.FlightClient(location, |
|
107 | **connection_args) |
|
108 | reader = get_client.do_get(endpoint.ticket) |
|
109 | df = reader.read_pandas() |
|
110 | print(df) |
|
111 | return df |
|
112 | print("no data found for get") |
|
113 | return '' |
|
114 | ||
115 | def _add_common_arguments(parser): |
|
116 | parser.add_argument('--tls', action='store_true', |
@@ 98-113 (lines=16) @@ | ||
95 | writer.close() |
|
96 | ||
97 | ||
98 | def get_flight_by_path(path, client, connection_args={}): |
|
99 | descriptor = pyarrow.flight.FlightDescriptor.for_path(path) |
|
100 | ||
101 | info = client.get_flight_info(descriptor) |
|
102 | for endpoint in info.endpoints: |
|
103 | print('Ticket:', endpoint.ticket) |
|
104 | for location in endpoint.locations: |
|
105 | print(location) |
|
106 | get_client = pyarrow.flight.FlightClient(location, |
|
107 | **connection_args) |
|
108 | reader = get_client.do_get(endpoint.ticket) |
|
109 | df = reader.read_pandas() |
|
110 | print(df) |
|
111 | return df |
|
112 | print("no data found for get") |
|
113 | return '' |
|
114 | ||
115 | def _add_common_arguments(parser): |
|
116 | parser.add_argument('--tls', action='store_true', |