(args, client, connection_args={})
| 75 | |
| 76 | |
| 77 | def push_data(args, client, connection_args={}): |
| 78 | print('File Name:', args.file) |
| 79 | my_table = csv.read_csv(args.file) |
| 80 | print('Table rows=', str(len(my_table))) |
| 81 | df = my_table.to_pandas() |
| 82 | print(df.head()) |
| 83 | writer, _ = client.do_put( |
| 84 | pyarrow.flight.FlightDescriptor.for_path(args.file), my_table.schema) |
| 85 | writer.write_table(my_table) |
| 86 | writer.close() |
| 87 | |
| 88 | |
| 89 | def get_flight(args, client, connection_args={}): |