GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - databricks/databricks-sql-nodejs: Databricks SQL Connector for Node.js

BranchesTags
Open more actions menu

Latest commit

 

History

554 Commits
554 Commits

Folders and files

NameName
Last commit message
Last commit date
.bot
.bot
 
 
.claude/knowledge
.claude/knowledge
 
 
.github
.github
 
 
bin
bin
 
 
docs
docs
 
 
examples
examples
 
 
lib
lib
 
 
native/kernel
native/kernel
 
 
spec
spec
 
 
tests
tests
 
 
thrift
thrift
 
 
.eslintrc
.eslintrc
 
 
.gitattributes
.gitattributes
 
 
.gitignore
.gitignore
 
 
.npmignore
.npmignore
 
 
.npmrc
.npmrc
 
 
.prettierignore
.prettierignore
 
 
.prettierrc
.prettierrc
 
 
CHANGELOG.md
CHANGELOG.md
 
 
CONNECTION_PARAMETERS.md
CONNECTION_PARAMETERS.md
 
 
CONTRIBUTING.md
CONTRIBUTING.md
 
 
KERNEL_REV
KERNEL_REV
 
 
LICENSE
LICENSE
 
 
NOTICE
NOTICE
 
 
README.md
README.md
 
 
SECURITY-OVERRIDES.md
SECURITY-OVERRIDES.md
 
 
nyc.config.js
nyc.config.js
 
 
osv-scanner.toml
osv-scanner.toml
 
 
package-lock.json
package-lock.json
 
 
package.json
package.json
 
 
tsconfig.build.json
tsconfig.build.json
 
 
tsconfig.json
tsconfig.json
 
 

Repository files navigation

Databricks SQL Driver for Node.js

http://www.apache.org/licenses/LICENSE-2.0.txt npm test coverage

Description

The Databricks SQL Driver for Node.js is a Javascript driver for applications that connect to Databricks clusters and SQL warehouses. This project is a fork of Hive Driver which connects via Thrift API.

Requirements

  • Node.js 22.23.4+, 24.22.1+, 26.12.1+, or a later release

Installation

npm i @databricks/sql

Usage

examples/usage.js

const { DBSQLClient } = require('@databricks/sql');

const client = new DBSQLClient();

client
  .connect({
    host: '********.databricks.com',
    path: '/sql/2.0/warehouses/****************',
    token: 'dapi********************************',
  })
  .then(async (client) => {
    const session = await client.openSession();

    const queryOperation = await session.executeStatement('SELECT "Hello, World!"');
    const result = await queryOperation.fetchAll();
    await queryOperation.close();

    console.table(result);

    await session.close();
    await client.close();
  })
  .catch((error) => {
    console.log(error);
  });

Configuration

See CONNECTION_PARAMETERS.md for every connection, session, and per-statement parameter the driver accepts, and whether each one applies to the Thrift backend (default), the SEA backend, or both.

Telemetry

The driver emits connection, statement, and CloudFetch metrics plus redacted error events to help Databricks improve driver reliability. No SQL text, parameter values, or row data is ever collected. Emission is gated by a server-side feature flag and can be disabled per-connection with telemetryEnabled: false or globally with the DATABRICKS_TELEMETRY_DISABLED env var.

See docs/TELEMETRY.md for the full event payloads, tuning knobs, multi-tenant guidance, and troubleshooting.

Run Tests

Unit tests

You can run all unit tests, or specify a specific test to run:

npm test
npm test -- <path/to/file.test.js>

e2e tests

Before running end-to-end tests, create a file named tests/e2e/utils/config.local.js and set the Databricks SQL connection info:

{
    host: '***.databricks.com',
    path: '/sql/2.0/warehouses/***',
    token: 'dapi***',
    database: ['catalog', 'database'],
}

Then run

npm run e2e
npm run e2e -- <path/to/file.test.js>

Contributing

See CONTRIBUTING.md

Issues

If you find any issues, feel free to create an issue or send a pull request directly.

License

Apache License 2.0

About

Databricks SQL Connector for Node.js

Topics

databricksdwhnodenode-jsnodejssql

Resources

Readme
Apache-2.0 license

Contributing

Contributing
Activity
Custom properties

Stars

37 stars

Watchers

8 watching

Forks

53 forks
Report repository

Releases

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.