Cloud Analytics Migration: Go With The Need

The Cloud offers access to new analytics capabilities, tools, and ecosystems that can be harnessed quickly to test, pilot, and roll out new offerings. However, despite compelling imperatives, businesses are concerned as they move their analytics to the Cloud. Organizations are looking at service providers who can help them allocate resources and integrate business processes to boost performance, contain cost, and implement compliance across on-premise private and public cloud environments.

The most cited benefit of running analytics in the Cloud is increased agility. With computing resources and new tools available on-demand, analytics applications and infrastructure can be developed, deployed, and scaled up — or down — much more rapidly than can typically be done on-premises.  

Snowflake External Functions

Introduction

Snowflake has recently announced external functions available in public preview. This allows developers to invoke external APIs from within their Snowflake SQL queries and blend the response into their query result, in the same way as if they were internal Snowflake functions.

In this article, we will demonstrate how to invoke an API via Amazon Web Services API Gateway that will trigger an AWS Lambda function. The Lambda function (written in Python) then  invokes a public API from to return the exchange rate for USD and multiple foreign currencies that can be used to calculate our sales values in USD and a number of selected currencies in SQL query running in our Snowflake warehouse. This solution eliminates the need for loading exchange rates into Snowflake regularly and also guarantees accurate, reliable real-time currency values.