Arrow Flight Client Node.js

Buscar tablas

Inicia el servidor Flight local y llama a listFlights(). El cliente devuelve un flujo asíncrono de recursos. Cada recurso incluye el descriptor de la tabla y sus puntos de conexión.

find-tables.ts
import { FlightClient } from 'arrow-flight-client';

async function main() {
  const client = new FlightClient('127.0.0.1:8815');

  try {
    console.log('Available flights:');

    for await (const flight of client.listFlights()) {
      console.log('-', flight.descriptor);
    }
  }
  finally {
    await client.close();
  }
}

await main();