Node.js
@spark-connect-js/node is the reference runtime adapter. It provides the gRPC transport (via @grpc/grpc-js), the Arrow IPC decoder (via apache-arrow), and re-exports the full public API from @spark-connect-js/core. For application code this is the only package you install.
Installing
Section titled “Installing”npm install @spark-connect-js/nodepnpm add @spark-connect-js/nodeyarn add @spark-connect-js/nodebun add @spark-connect-js/nodeimport { connect } from "@spark-connect-js/node";
const spark = connect("sc://localhost:15002");const rows = await spark.sql("SELECT 1 AS n").collect();console.log(rows);await spark.stop();See the Quickstart for a full walkthrough and the API reference for every exported symbol.
Requirements
Section titled “Requirements”- Node.js 22 or later.
- A reachable Spark Connect server (Spark 3.4 or newer).