Best approach to pulling data from Snowflake

Our team has some data resident in a Snowflake Data warehouse. The data is the output of an algorithm I don’t any operational control over, so I need to pull the data out of Snowflake into Losant for further processing/alerting to my customer. Has anyone successfully reached into a Snowflake instance? Snowflake provides modules for Javascript and Python, but they are not supported natively in the current Javascript backend or Conda.

I had planned on utilizing a JWT to login to our snowflake instance, but am at a bit of a loss without leveraging thier module.

I’m open to any thoughts on a different approach, or timeline/interest from Losant to roll those modules into the usable library space.

https://docs.snowflake.com/en/developer-guide/drivers

Thanks, Jason

I’ll create a feature request for a native Snowflake workflow node and will let you know if we implement.

Snowflake does have a public REST API and a SQL REST API for performing queries, which you could interact with using an HTTP Node.

The trick is authentication, as it sounds like you’ve already discovered. You’d need to set up key-pair authentication for your user. (That part you would do outside of Losant in your own environment.)

Then, based on their instructions for generating a JWT, I’m pretty confident you could use a JWT: Create Node for generating a token to authenticate the request.

That’s right Dylan, authentication was the problem. My workflow works if I use the JWT on my local machine, but of course it expires after a short time and would have to be worked in the cloud.

I appreciate you creating the feature request. I’ll be interested to see if there is a interest for it out there in Losantland.

I don’t see anything in their documentation about a max exp time on the generated JWT but you could try setting a timestamp well into the future (say a year or more) and see if that auth method continues to work.

If you’re not doing so already, I’d strongly recommend storing the authentication info in an HTTP service credential for extra security, especially if you end up making a long-lived token.

You are right, the max exp is not published, but is 60 minutes. Trying to set it larger results in acceptance of the larger value, but behavior as if it didn’t take. I did create a work around that will allow me to demonstrate the capability but would be very interested to hear if the Losant team might consider adding snowflake api support to the workflow function library set.