How to use a node.js API proxy to access an MS Azure database

I was wondering if anybody in the Apigee community has managed to use a node.js API proxy to access an Azure database.

It looks like MS recommends using the tedious driver to do this as documented here:

https://docs.microsoft.com/en-us/azure/sql-database/sql-database-connect-query-nodejs

It looks like the using tedious with the mssql package documented here:

https://www.npmjs.com/package/mssql

does not work with the current node.js implementation on the Apigee Message Processors.

Has any body out there managed to implement the mssql package successfully with Apigee or found some other way to successfully query an Azure db?

Many thanks!

1 3 1,116
3 REPLIES 3

@karl.kalckstein , Regarding "does not work with the current node.js implementation", Any more details that you can share ?

@Anil Sagar what seems to happen with mssql module and tedious driver in the test I have seen is that the MP connects to the Azure DB but then no tds packets are sent until the node code times out.

I have not queried an MS Azure DB. I have queried an MS SQL Server, from nodejs running within the Trireme engine, inside the Apigee Edge Message Processor.

I used... "seriate": "^0.7.1"

...to connect to MS SQL. I think it was MS SQL 2008, if that matters. Of course it did use the TDS protocol.

This page suggests that Seriate ought to be able to connect to an Azure-hosted DB. You just need to specify the correct connection param and be sure to use encrypt:true.