Databricks
Databricks combines data warehouses & data lakes into a lakehouse architecture.

Official Websitehttps://www.databricks.com/
NodeJS packagehttps://www.npmjs.com/package/@databricks/sql
Version1.0.0
TagsDatabase, SQL
Credential configuration
To access your cluster or SQL warehouse you'll need:
- Your Databricks personal access token, that is similar to the following:
dapi1ab2c34defabc567890123d4efa56789
. - Your cluster's or SQL warehouse's Server Hostname, that is similar to the following:
dbc-a1b2345c-d6e7.cloud.databricks.com
. - The HTTP Path value for path, that is similar to the following:
- For a cluster,
sql/protocolv1/o/1234567890123456/1234-567890-abcdefgh
- For a SQL warehouse,
/sql/1.0/endpoints/a1b234c5678901d2
- For a cluster,
Check this page for more information.
Here you have an example of a filled credential configuration form in YepCode:

Databricks snippets available in editor
note
The title is the triggering text for YepCode to autocomplete the script
Integration
New integration from credential
const databricksClient = yepcode.integration.databricks("credential-slug");
New integration from plain authentication data
const { DBSQLClient } = require('@databricks/sql');
const databricksClient = new DBSQLClient();
await databricksClient
.connect({
host: 'host',
path: 'path',
token: 'token',
})
Execute query
Execute query
const session = await databricksClient.openSession();
const queryOperation = await session.executeStatement(
'SELECT "Hello, World!"',
{ runAsync: true }
);
const result = await queryOperation.fetchAll();
await queryOperation.close();
console.table(result);
await session.close();
await databricksClient.close();
Execute insert
Execute insert
const session = await databricksClient.openSession();
const createTableOperation = await session.executeStatement(
'CREATE TABLE IF NOT EXISTS pokes (foo INT, bar STRING)',
);
await createTableOperation.fetchAll();
await createTableOperation.close();
await session.close();
await databricksClient.close();