Query SQL database


I’m wondering if there are any built in tools for querying a Microsoft SQL database?


We don’t currently have any built in way to directly query Microsoft SQL. This is primarily because in order to allow Losant’s cloud to query your database, you’d have to expose the database to the internet, which is not a recommended practice.

In most cases, your databases will sit behind an API that provides authentication and a secure way to access your data. You can then use the HTTP Node to request your API endpoints.

If your database is hosted on AWS, you can use Lambda as a secure way to access the data. If your database is hosted on GCP, Cloud Functions is another option.



Thanks. What I had in mind is to deploy it as an edge workflow inside my network.


Ah, an edge workflow is definitely a different story. That could absolutely make direct connections to SQL in a secure way. It’s not something we’ve considered, but it makes sense.

Depending on your knowledge of Node and Docker, you could extend our base Edge Agent container and add a custom script that allows you to make queries. You’d then invoke the script using the Run Executable Node.

If that’s not something you want to take on yourself, our internal solutions team could create that for you pretty quickly. I believe you’re already hooked up with them, so could be something to ask about.

I did add the feature request to our issue tracking system, but I can’t provide any estimate for release at this time.



Sounds good.

FYI NODERed does have an SQL node so that could be a model/example.


Any updates on this feature here?


A SQL node for use in Edge Workflows is actually in development at the moment, and will probably be included in the next version of the Edge Agent.


Awesome. Would that work with Microsoft sql server databases?


That is the plan! We are planning to support MSSQL, MySQL, Postgres, and SQLite.


How far out in time do you think that might be?