evidence icon indicating copy to clipboard operation
evidence copied to clipboard

Support Azure SQL DB

Open mcrascal opened this issue 3 years ago • 3 comments

What do you use this database for? Azure SQL DB.

Are there any popular and well-maintained clients for this database?

MS supported node driver

Are you interested in contributing this database connector? Yes

mcrascal avatar Jan 29 '23 01:01 mcrascal

is this done?

archiewood avatar Sep 21 '23 14:09 archiewood

Hello - looping back on connector requests

We have recently re-architected Evidence (since this issue was opened), and Evidence is now "pluggable", meaning you can write your own connectors, publish them, and use them in Evidence.

If you are interesting in writing a connector, here are some resources:

  1. Docs on creating a plugin: https://docs.evidence.dev/plugins/creating-a-plugin/datasources
  2. Template for a connector plugin: https://github.com/evidence-dev/datasource-template
  3. An example that I spun up for pulling stats from the npm API: https://github.com/archiewood/npm-stats

If you do write a plugin:

  • the suggested package name is evidence-connector-[plugin]
  • the docs are new, so let us know if there is extra information you need
  • share it on the Evidence community, and we'll feature it!

archiewood avatar Feb 16 '24 00:02 archiewood

I'm not experienced with JavaScript (although I am with Python, C# and SQL), but I managed to get the Evidence MSSQL connector working with an Azure Synapse serverless SQL database using a shared client secret. I'd imagine adding in the other authentication types wouldn't be too difficult. I've started attempting it, but again, I'm a JavaScript novice. The API documentation on authentication is here: https://tediousjs.github.io/tedious/api-connection.html

Essentially I've changed this section to make it work: const credentials = { authentication: { type: 'azure-active-directory-service-principal-secret', options: { clientId: database.clientid, clientSecret: database.clientsecret, tenantId: database.tenantid, } }, server: database.server, database: database.database, port: parseInt(database.port ?? 1433), options: { trustServerCertificate: trust_server_certificate === 'true' || trust_server_certificate === true, encrypt: encrypt === 'true' || encrypt === true } };

timothyhoward avatar Mar 03 '24 10:03 timothyhoward