Powered by Snowflake: How Connected Applications Work
The emerging connected application model is capturing the interest of many software companies and developers.. As we explained in part 1 of this blog series, connected applications are SaaS apps that separate code and data such that the app provider maintains the application code while their customers manage the data in their own data platform. Building connected apps on Snowflake has many benefits for both customers and SaaS providers. Customers maintain control of their own data and SaaS providers can better align with Snowflake’s go-to-market strategy.
Let’s take a closer look at how Snowflake connected applications work and how they are built.
How Snowflake Connected Apps Work
To illustrate how connected apps work, let’s consider a developer of a SaaS solution, such as a marketing application that recommends which customer segment to target in the next ad campaign based on a variety of data sources. As shown in Figure 1, the application would collect the data from the customer’s relevant sources, process it as needed, and persist the data in the customer’s own Snowflake instance. The application would then apply prediction models to the data and write the results to another table within the customer’s Snowflake instance.
Figure 1: Typical connected application data flows
The data flows for a connected app can vary depending on the use case. There may be cases, for example, where the customer’s Snowflake instance already contains all the data the application needs, so no additional loading is required.
Figure 2 illustrates the data flows when there are multiple customers. Each customer retains their data in their own Snowflake instance and no multi-tenancy is required.
Figure 2: Typical connected application data flows with multiple customers
By contrast, the same application built as a managed app would store all the customers’ data in its own multi-tenant Snowflake instance, as shown in Figure 3. In this case the provider has control of the data and credit consumption is on the provider’s Snowflake account.
Figure 3: Typical managed application data flows
When managed applications are built on Snowflake, customers can access their data using Snowflake’s Secure Data Sharing feature (not shown in Figure 3). This enables customers to have immediate access to their data without having to build API pipelines as referenced in part 1 of this blog series.
Building Apps That Support Both Connected and Managed Application Models
The choice of a connected app or a managed app model is not mutually exclusive. You can build an application as a managed app for some customers and a connected app for others. In this case the provider of the application connects to its customers’ Snowflake instance if available, or to its own if not (see Figure 4).
Figure 4: An application that supports both connected and managed app models
How to Onboard Customers
To onboard a customer to the connected application, the customer would create a dedicated user for this purpose on their Snowflake account and load the new user’s credentials into the application. A role is then used to limit the application’s access within the database; the customer keeps control of their data in their unified source of truth.
How Connected Apps Load Data
Depending on the application’s needs, data can be streamed using a streaming service such as Kafka or staged in a bucket in cloud object storage. Snowpipe, Snowflake’s serverless continuous data ingestion service, is then used to load the data into the customer’s Snowflake account, as shown in Figure 5.
Figure 5: Loading data into Snowflake with a connected app
We recommend that the staging bucket or streaming service resides with the app provider to avoid putting that burden on the customer. Successful connected applications generally do not require customers to manage any infrastructure outside the Snowflake Data Cloud. For more details on how to load data into Snowflake, please refer to our documentation for Snowpipe and our Kafka connector.
How Connected Apps Query Data
Querying the customer’s Snowflake instance is straightforward. Snowflake is fully ANSI SQL compliant so any application that uses a SQL database can easily implement bidirectional query support. In addition, applications can query Snowflake using a broad set of programming languages and supported connectors. Snowflake connectors and drivers include Node.js, Go, .NET, JDBC, ODBC, PHP, Python, and Spark. You can also easily query Snowflake without deploying and managing drivers using our SQL REST API. For details on connectivity options, please reference the documentation for our connectors and API.
Implementing a connected app integration with Snowflake is simple. Based on the experiences of our Powered by Snowflake partners, projects typically take six to eight weeks to complete depending on the product and the team.
Want More? Become a Powered by Snowflake Partner
The Powered by Snowflake program guides members on how to design and implement applications that run on Snowflake. The program also helps partners after launching their joint solution to raise awareness among Data Cloud users. To learn more, check out the Powered by Snowflake program and register to join the Snowflake Partner Network.