### Node databricks-connection
In the current Node repository, the Databricks connection is established utilizing the Databricks SQL Driver for Node.js.
Approach followed : Databricks personal access token authentication
Requirements :
```
NodeJS : v16.6.0+
package from npm : @databricks/sql
```
The databricks connection created here will be exported, enabling the execution of SQL queries.
#### To test locally
To test the databricks connection, a sample test.ts file has been created in this directory which
creates a databricks connection and executes a test sql query.
To run this locally - Create a js file say app.js under src, and a call can be made to testdatabricks function in the test file.
Sample js file to be created to test in local :
```
const { testdatabricks } = require('./src/databricks/test');
async function runApp() {
  try {
    const result = await testdatabricks();
    console.log('Result:', result);
  } catch (error) {
    console.error('Error:', error);
  }
}
runApp();
```
Command to run to execute the sample test query : node app.js
Note : Ensure that aws cli access is set up in local, as it fetches the secret values like token, warehouseId from aws.