Skip to main content

Unistore Workload and Hybrid Tables

In this session, Carl Perry, Director of Product Management at Snowflake, introduces a new table type, Hybrid Tables, that allows for fast, single-row operations so transactional apps can be built directly on Snowflake. It is the feature that powers Snowflake’s new Unistore workload. 

What is Unistore?

Unistore is a new workload that delivers a modern approach to working with transactional and analytical data together in a single platform. Unistore was created for many reasons. Our customers are tired of moving data between their systems. They no longer want to manage redundant datasets across multiple solutions. They want to access data when they need, and be able to work with virtually all their data in one place. But Unistore’s impact is far more significant than unifying data. Teams can now build transactional business applications directly on Snowflake, run real-time analytical queries on their transactional data, and get a consistent approach to governance and security.

Snowflake customers such as Adobe, UiPath, IQVIA, Novartis, and Wolt are all early adopters of Unistore. We’ve seen them use Unistore for use cases such as storing application state for pipelines, handling data serving or powering online feature stores, and even backing enterprise transactional applications. Early feedback has been excellent and our customers are excited that Snowflake can now support these transactional use cases. Customers are eager and ready to take advantage of the many Unistore benefits, including:

  • A single dataset to power the future of modern development  

Act on transactional data almost immediately, build better customer experiences, and get new insights by integrating transactional and analytical data in a single dataset.

  • Simple and streamlined transactional app development on Snowflake

Build enterprise transactional apps and more with the same simplicity, performance, and ease you expect from Snowflake’s Data Cloud.

  • Consolidated transactional and analytical systems

Simplify architectures and standardize security and governance controls on a single platform, while eliminating the need to move or copy data. 

A Single Platform for Both Transactional and Analytical Data

Hybrid Tables for transactional use cases

Hybrid Tables (currently in private preview) are a new Snowflake table type powering Unistore. A key design principle when we built Hybrid Tables was the need to support the most common transactional capabilities that application developers have come to rely on. Clearly, performance is a critical aspect of any transactional application, especially for fast single-row operations. To support that, we’ve developed an entirely new row-based storage engine so enterprise transactional applications can now be built directly on Snowflake.  

Getting started with Hybrid Tables is easy. Simply create a table the same way you would any other traditional Snowflake table. But to support these transactional workloads, Hybrid Tables require a primary key and Snowflake will now enforce the uniqueness of your applications’ primary keys.

    Orderkey number(38,0) PRIMARY KEY,
    Customerkey number(38,0),
    Orderstatus varchar(20),
    Totalprice number(38,0),
    Orderdate timestamp_ntz,
    Clerk varchar(50)

Of course, your application requires more than a single table. An application’s data model is defined by the relationships between tables using primary keys and foreign keys. And with Hybrid Tables, you can define the relationship using referential integrity constraints that are now enforced. Let’s walk through an example. First we’ll create the Hybrid Tables and the associated constraint:

    CustomerKey number(38,0) PRIMARY KEY,
    Customername varchar(50)

-- Create order table with foreign key referencing the customer table
    Orderkey number(38,0) PRIMARY KEY,
    Customerkey number(38,0),
    Orderstatus varchar(20),
    Totalprice number(38,0),
    Orderdate timestamp_ntz,
    Clerk varchar(50),
CONSTRAINT fk_o_customerkey FOREIGN KEY (Customerkey) REFERENCES Customers(Customerkey),
INDEX index_o_orderdate (Orderdate)); -- secondary index to accelerate time-based lookups

Now let’s insert a customer record and an order that would violate the constraint:

VALUES (97, 'CustA'),
       (94, 'CustB'),
       (72, 'CustC'),
       (34, 'CustD'),
       (23, 'CustE');

-- Inserting order fails because foreign key, customer 36, does not exist in the customer table
VALUES (8, 36, 'OPEN', 100, current_timestamp::timestamp_ntz, 'Margaret');

Hybrid Tables include many more new capabilities to support building and running enterprise transactional apps: additional constraints, indexes, and row-level locking, to name a few. This is just the beginning and we will continue to evolve Unistore and Hybrid Tables with additional features to enable even more use cases.

Analytics on transactional data

While the ability to build transactional applications directly on Snowflake is exciting in its own right, the power of Unistore doesn’t stop there. Unistore unlocks the full potential of your data by enabling you to perform analytics directly on your transactional data. This data holds a lot of value for analytics, which is why we see many of our customers load their transactional data into Snowflake from external databases in order to mine business insights. But you can get even more powerful insights if you run analytics on transactions as they happen. Imagine having an orders table with a billion records instantly incorporated into a dashboard that reports weekly sales trends. Using Hybrid Tables, you simply run the analytical query directly on your transactional data and the results are returned with the analytical performance you’d expect from Snowflake.

SELECT date_trunc(week, Orderdate) AS OrderWeek, SUM(Totalprice) AS WeeklyAmount
FROM Orders
GROUP BY OrderWeek
ORDER BY OrderWeek

In addition to powering analytical queries directly on your transactional data, Hybrid Tables allow you to break down data silos between your transactional and historic data. You can join Hybrid Tables with your other data that’s already in Snowflake—existing Snowflake tables, data from the Snowflake Marketplace, or data shared from other teams. For example, you can overlay your orders data with information from existing marketing campaigns, all without having to move any data between systems.

SELECT c.Customername, ch.Campaignsource, SUM(o.Totalprice) AS TotalAmount
FROM Orders o 
JOIN Customers c ON o.Customerkey = c.Customerkey
JOIN CampaignHistory ch ON o.campaignid = ch.campaignid
GROUP BY ch.Campaignsource, c.Customername
ORDER BY TotalAmount

All in the Data Cloud

You’ve seen how easy it is to use Hybrid Tables, and how this can transform your architecture, applications, and workflows. Perhaps the most important feature of Unistore is that it’s one of a number of workloads powered by Snowflake’s Data Cloud. This means you can reap certain benefits such as:

  • Consistently enforced data governance and security controls across your data
  • True cloud performance at scale with Snowflake’s elastic performance engine
  • No need to manage infrastructure, query tuning, updates, or data continuity with the simplicity of Snowflake
  • Seamless integration with data shared across clouds and regions, without having to copy or move data 

Snowflake provides this level of integration and consistency by reducing the number of concepts to learn, technologies to deal with, and knobs to turn. That’s the true Snowflake way. 

Hybrid Tables are just the beginning of what Unistore will become. Snowflake has continually delivered many innovations over the previous years, and now the day has come when it’s possible for organizations to use a single platform for both their transactional and analytical data. It’s just a matter of time when acquiring insights that were once difficult, or even unthinkable, will become mainstay. So please join us in building the unthinkable with Unistore.

Sign up for public preview

If you’re interested in trying out Unistore and Hybrid Tables, sign up for public preview once it’s available. To learn more, reach out to your Snowflake representative and check out these resources:

Try Unistore!

Forward Looking Statements
This blog contains express and implied forwarding-looking statements, including statements regarding (i) Snowflake’s business strategy, (ii) Snowflake’s products, services, and technology offerings, including those that are under development or not generally available, (iii) market growth, trends, and competitive considerations, and (iv) the integration, interoperability, and availability of Snowflake’s products with and on third-party platforms. These forward-looking statements are subject to a number of risks, uncertainties and assumptions, including those described under the heading “Risk Factors” and elsewhere in the Quarterly Reports on Form 10-Q and the Annual Reports on Form 10-K that Snowflake files with the Securities and Exchange Commission. In light of these risks, uncertainties, and assumptions, actual results could differ materially and adversely from those anticipated or implied in the forward-looking statements.  As a result, you should not rely on any forwarding-looking statements as predictions of future events.  

For more information about our Unistore workload click here