Arrow Flight Client Node.js

Rechercher des tables

Démarrez le serveur Flight local et appelez listFlights(). Le client renvoie un flux asynchrone de ressources. Chaque ressource contient le descripteur d’une table et la liste de ses points de terminaison.

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