Arrow Flight Client Node.js

Discover tables

Start the local Flight server and call listFlights(). The client returns an asynchronous stream of resources. Each resource includes the table descriptor and its list of endpoints.

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();