Databricks SQL Driver is a JavaScript driver for connection to Databricks SQL via Thrift API.
npm i databricks-sql-nodeconst { DBSQLClient } = require('databricks-sql-node');
const client = new DBSQLClient();
const utils = DBSQLClient.utils;
client.connect({
host: '********.databricks.com',
path: '/sql/1.0/endpoints/****************',
token: 'dapi********************************',
}).then(async client => {
const session = await client.openSession();
const queryOperation = await session.executeStatement('SELECT "Hello, World!"', { runAsync: true });
await utils.waitUntilReady(queryOperation, false, () => {});
await utils.fetchAll(queryOperation);
await queryOperation.close();
const result = utils.getResult(queryOperation).getValue();
console.table(result);
await session.close();
await client.close();
}).catch(error => {
console.log(error);
});For more details see: Getting Started
Unit tests:
npm run teste2e tests:
npm run e2eBefore running e2e tests, create local configuration file
See CONTRIBUTING.md
If you find some issues, feel free to create an issue or send a pull request.