Arrow Flight Client Node.js

Encontrar tabelas

Inicie o servidor Flight local e chame listFlights(). O cliente retorna um fluxo assíncrono de recursos. Cada recurso contém o descritor da tabela e a lista de 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();