Announcements
The Google Cloud Community will be in read-only from July 16 - July 22 as we migrate to a new platform; refer to this community post for more details.
Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

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

kkalckstein
Former Googler

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,257
3 REPLIES 3

anilsr
Former Googler

@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.