{"id":18400673,"url":"https://github.com/databricks/databricks-sql-nodejs","last_synced_at":"2025-04-04T18:05:08.830Z","repository":{"id":37056518,"uuid":"494180501","full_name":"databricks/databricks-sql-nodejs","owner":"databricks","description":"Databricks SQL Connector for Node.js","archived":false,"fork":false,"pushed_at":"2025-04-02T05:18:50.000Z","size":2022,"stargazers_count":25,"open_issues_count":34,"forks_count":35,"subscribers_count":10,"default_branch":"main","last_synced_at":"2025-04-03T00:58:59.323Z","etag":null,"topics":["databricks","dwh","node","node-js","nodejs","sql"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/databricks.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-05-19T18:07:23.000Z","updated_at":"2025-04-02T05:18:55.000Z","dependencies_parsed_at":"2023-09-22T22:51:14.433Z","dependency_job_id":"89ef4a8a-4914-45a0-8c85-e648ea61f184","html_url":"https://github.com/databricks/databricks-sql-nodejs","commit_stats":null,"previous_names":[],"tags_count":20,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/databricks%2Fdatabricks-sql-nodejs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/databricks%2Fdatabricks-sql-nodejs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/databricks%2Fdatabricks-sql-nodejs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/databricks%2Fdatabricks-sql-nodejs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/databricks","download_url":"https://codeload.github.com/databricks/databricks-sql-nodejs/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247226213,"owners_count":20904465,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["databricks","dwh","node","node-js","nodejs","sql"],"created_at":"2024-11-06T02:35:58.114Z","updated_at":"2025-04-04T18:05:08.809Z","avatar_url":"https://github.com/databricks.png","language":"TypeScript","readme":"# Databricks SQL Driver for Node.js\n\n![http://www.apache.org/licenses/LICENSE-2.0.txt](http://img.shields.io/:license-Apache%202-brightgreen.svg)\n[![npm](https://img.shields.io/npm/v/@databricks/sql?color=blue\u0026style=flat)](https://www.npmjs.com/package/@databricks/sql)\n[![test](https://github.com/databricks/databricks-sql-nodejs/workflows/test/badge.svg?branch=main)](https://github.com/databricks/databricks-sql-nodejs/actions?query=workflow%3Atest+branch%3Amain)\n[![coverage](https://codecov.io/gh/databricks/databricks-sql-nodejs/branch/main/graph/badge.svg)](https://codecov.io/gh/databricks/databricks-sql-nodejs)\n\n## Description\n\nThe 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](https://github.com/lenchv/hive-driver) which connects via Thrift API.\n\n## Requirements\n\n- Node.js 14 or newer\n\n## Installation\n\n```bash\nnpm i @databricks/sql\n```\n\n## Usage\n\n[examples/usage.js](examples/usage.js)\n\n```javascript\nconst { DBSQLClient } = require('@databricks/sql');\n\nconst client = new DBSQLClient();\n\nclient\n  .connect({\n    host: '********.databricks.com',\n    path: '/sql/2.0/warehouses/****************',\n    token: 'dapi********************************',\n  })\n  .then(async (client) =\u003e {\n    const session = await client.openSession();\n\n    const queryOperation = await session.executeStatement('SELECT \"Hello, World!\"');\n    const result = await queryOperation.fetchAll();\n    await queryOperation.close();\n\n    console.table(result);\n\n    await session.close();\n    await client.close();\n  })\n  .catch((error) =\u003e {\n    console.log(error);\n  });\n```\n\n## Run Tests\n\n### Unit tests\n\nYou can run all unit tests, or specify a specific test to run:\n\n```bash\nnpm test\nnpm test -- \u003cpath/to/file.test.js\u003e\n```\n\n### e2e tests\n\nBefore running end-to-end tests, create a file named `tests/e2e/utils/config.local.js` and set the Databricks SQL connection info:\n\n```javascript\n{\n    host: '***.databricks.com',\n    path: '/sql/2.0/warehouses/***',\n    token: 'dapi***',\n    database: ['catalog', 'database'],\n}\n```\n\nThen run\n\n```bash\nnpm run e2e\nnpm run e2e -- \u003cpath/to/file.test.js\u003e\n```\n\n## Contributing\n\nSee [CONTRIBUTING.md](CONTRIBUTING.md)\n\n## Issues\n\nIf you find any issues, feel free to create an issue or send a pull request directly.\n\n## License\n\n[Apache License 2.0](LICENSE)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdatabricks%2Fdatabricks-sql-nodejs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdatabricks%2Fdatabricks-sql-nodejs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdatabricks%2Fdatabricks-sql-nodejs/lists"}