{"id":46943,"date":"2023-09-20T07:01:58","date_gmt":"2023-09-20T11:01:58","guid":{"rendered":"https:\/\/centricconsulting.com\/?p=46943"},"modified":"2023-12-06T15:06:40","modified_gmt":"2023-12-06T20:06:40","slug":"important-snowflake-updates-a-look-at-dynamics-tables-and-more","status":"publish","type":"post","link":"https:\/\/centricconsulting.com\/blog\/important-snowflake-updates-a-look-at-dynamics-tables-and-more\/","title":{"rendered":"Important Snowflake Updates: A Look at Dynamic Tables and More"},"content":{"rendered":"<h2 style=\"text-align: center;\">Snowflake&#8217;s latest updates include built-in declarative data pipelines through its dynamic tables, which allow for the automatic processing of incremental data without compromising load times. In our blog, we delve into these tables and explain how they can simplify daily data management.<\/h2>\n<hr \/>\n<p>Organizations that service customer data requirements often face technical challenges due to the inherent complexity of data management. These headaches can include data silos, limited scalability, the need for more efficient pipelines for data streaming and the separation of analytical and transactional data (to name a few). <a href=\"https:\/\/centricconsulting.com\/blog\/what-should-i-know-about-snowflake\/\">Snowflake<\/a>, a cloud-native solution with a unique \u201cmulti-cluster\u201d architecture, has worked wonders to address these problems with it&#8217;s latest updates. Behind its user-friendly SQL interface, Snowflake provides nearly unlimited storage and scaling capability with minimal configuration. That capacity makes it easier to collect, organize and access your data without sacrificing performance.<\/p>\n<p>Now, Snowflake is providing built-in declarative data pipelines through its dynamic tables. What\u2019s a declarative data pipeline? It\u2019s a type of pipeline that reduces development time and increases performance by letting you focus on a desired outcome rather than the underlying mechanics.<\/p>\n<p>Snowflake has also announced it will combine transactional and analytical support through its hybrid tables and offer open-format interoperability through its <a href=\"https:\/\/www.snowflake.com\/blog\/iceberg-tables-powering-open-standards-with-snowflake-innovations\/\" target=\"_blank\" rel=\"noopener\">Iceberg Table<\/a> support. Iceberg Tables will let you store large datasets used outside of your daily workloads, offering a cost-effective data retention option and the ability to securely share with non-Snowflake users.<\/p>\n<p>These are only some of the enhanced features Snowflake has teased in the last year. <strong>We\u2019re here to share the latest and greatest in Snowflake offerings and dig into the details all data engineers should know.<\/strong> Use this explainer to bring team members up to speed on Snowflake\u2019s new iteration \u2014 and follow us for future updates.<\/p>\n<h2>The Latest and Greatest Snowflake Updates<\/h2>\n<p>Snowflake has expanded the platform so it can handle both day-to-day tasks and big data analysis using the same system. They also improved how the system looks and feels for users. Moreover, with the introduction of Dynamic, Hybrid and Iceberg Tables, Snowflake provides tools and tactics to simplify and <a href=\"https:\/\/centricconsulting.com\/blog\/improving-data-management-to-stay-ahead-of-supply-chain-disruption\/\">streamline daily data management<\/a>.<\/p>\n<p>The Iceberg and Hybrid Tables are currently in the private preview stage, meaning customers need to specifically request access from Snowflake. The Snowflake Summit held on June 26, 2023, in Las Vegas, announced the preview for dynamic tables. <strong>Here\u2019s a run-down of all the remarkable things these tables can do.<\/strong><\/p>\n<h3>Save Time with Dynamic Tables<\/h3>\n<p>In Snowflake, a Dynamic Table is a table that automatically updates itself \u2014 including your logic \u2014 with the latest data as new data or updates flow into its source tables. It\u2019s similar to a View but supports more complex combinations of underlying data than a view, with lower code complexity than a stream. This offering fixes a major pain point \u2014 Snowflake\u2019s old mechanisms for merging and updating incremental data changes.<\/p>\n<p>Today, most businesses have a real need for incremental data updates that use flexible pipelines. However, a common challenge for data engineers is knowing how to process incremental data without compromising the load times and credits of the underlying warehouse.<\/p>\n<p>Yes, the old version of Snowflake provided streams and tasks to handle delta changes. <strong>However, those capabilities required extensive time and SQL knowledge to:<\/strong><\/p>\n<ol>\n<li>Merge the incremental changes with existing data.<\/li>\n<li>Schedule the update via task to sync the changes.<\/li>\n<\/ol>\n<p>On top of that, task scheduling sometimes caused process lags due to the refresh interval not being well-defined.<\/p>\n<p>Data engineers would often work around these issues and process delta data by performing a full data refresh or an incremental refresh. A full refresh would truncate or drop and recreate the tables whenever you needed to consume the complete data from the source. An incremental refresh would save costs and eliminate the need to deal with high-volume data.<\/p>\n<p>However, neither approach could solve for latency, maintenance issues or the costs of warehousing data. <strong>Full data refreshes also tended to hinder the scalability, time efficiency, and cost of warehousing while consuming a lot of data.<\/strong><\/p>\n<p>Users needed a smart, tech-driven process to identify delta changes without manual intervention. Thankfully, Snowflake\u2019s developers delivered. Dynamic tables meet this need by providing flexibility and scalability to identify incremental data and process data streams, and you won\u2019t have to write a single line of code.<\/p>\n<p>Dynamic table features include:<\/p>\n<ul>\n<li>Elimination of the single-table limit in SELECT.<\/li>\n<li>Automatic processing of incremental data (in other words, these tables operate on changes since the last refresh).<\/li>\n<li>Identification of incremental changes that have happened on tables in defined pipelines without developer intervention (this allows for controlled and manageable pipelines).<\/li>\n<li>A virtual warehouse to use for all compute requirements (you can resize the warehouse according to workload).<\/li>\n<li>The ability to skip the refresh schedule if the underlying tables have not changed during the lag period.<\/li>\n<li>Replication of the entire metadata along with data during replication (compared to the former materialized views, which only replicated metadata).<\/li>\n<li>A lag setting of one minute, minimum.<\/li>\n<\/ul>\n<p>The bottom line: In the past, to process delta changes, data engineers had to use streams to capture change data and tasks to automate the job. With the introduction of dynamic tables, all incremental changes are handled in an automated way, eliminating the need for streams and tasks altogether.<\/p>\n<p><strong>Syntax:<\/strong><code><br \/>\nCREATE [ OR REPLACE] DYNAMIC TABLE<br \/>\nLAG = ' {seconds | minutes | hours | days}'<br \/>\nWAREHOUSE =<br \/>\nAS SELECT<br \/>\n<\/code><\/p>\n<p><strong>Where:<\/strong><\/p>\n<ul>\n<li>LAG: Defines the time interval or frequency when Dynamic table would be refreshed.<\/li>\n<li>Warehouse: User-defined warehouse based on the nature of workload.<\/li>\n<\/ul>\n<div id=\"attachment_46949\" style=\"width: 514px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/centricconsulting.com\/wp-content\/uploads\/2023\/09\/Snowflake-tables-chart.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-46949\" class=\"size-full wp-image-46949\" src=\"https:\/\/centricconsulting.com\/wp-content\/uploads\/2023\/09\/Snowflake-tables-chart.jpg\" alt=\"Centric Consulting - Snowflake shares a simpler way to transform data without having to manage streams and tasks.\" width=\"504\" height=\"344\" srcset=\"https:\/\/centricconsulting.com\/wp-content\/uploads\/2023\/09\/Snowflake-tables-chart.jpg 504w, https:\/\/centricconsulting.com\/wp-content\/uploads\/2023\/09\/Snowflake-tables-chart-300x205.jpg 300w\" sizes=\"(max-width: 504px) 100vw, 504px\" \/><\/a><p id=\"caption-attachment-46949\" class=\"wp-caption-text\">Snowflake shares a simpler way to transform data without having to manage streams and tasks. https:\/\/www.snowflake.com\/blog\/dynamic-tables-delivering-declarative-streaming-data-pipelines\/<\/p><\/div>\n<h3>Reduce Redundancy with Hybrid Tables<\/h3>\n<p>A hybrid table is a new Snowflake structure that stores the same data for both transactional and analytical purposes at the same time, seamlessly transitioning between modes depending on the operation. <strong>Customers can now simplify their data platform, reducing pipelines and eliminating synchronization issues.<\/strong><\/p>\n<p>Consider, for example, an insurance company that uses both an insurance management system and an Oracle Siebel CRM application (in the claims module) to manage their data. The insurance an Online Analytical Processing (OLAP) system in Snowflake is designed to process high volumes of data with no latency. Data analysts at the insurance company use the OLAP System to derive analytical insights and make business decisions.<\/p>\n<p>The Siebel insurance module within the system facilitates this process by ingesting great amounts of transactional data in real time. It takes in claims, auto policy and life insurance policy data, to name a few. <strong>The module ingests these data through quota management via issuance and maintenance.<\/strong><\/p>\n<p>To extend their business forecasting ability, the insurance company decides to define a model that will pull their data from the Siebel i.e., Online Transaction Processing (OLTP) system. The model will also need to collaborate with the OLAP insurance system. Altogether, the model will help to provide powerful insights about the company\u2019s projected growth.<\/p>\n<p>But the company has a problem: the data redundancy that comes with moving transactional and analytical data, stored separately, across their systems. Moreover, customers want a single place or system to store their entire data \u2014 one they can easily access.<\/p>\n<p>Hybrid tables (aka Unistore) solve this problem. They provide a new workload that brings both transactional and analytical data together in a single platform. Hybrid tables are exactly what the insurance company in our example needs to streamline its current infrastructure and derive effective business insights. This updated architecture provides seamless data integration and simplified data joins.<\/p>\n<p><strong>Hybrid table features include:<\/strong><\/p>\n<ul>\n<li>The ability to generate unified data sets by bringing both OLTP and OLAP applications and data together in one place.<\/li>\n<li>An opportunity for data engineers to develop their OLTP business applications directly on Snowflake.<\/li>\n<li>The chance to perform analytical queries on transactional data in real-time and develop meaningful insights from it.<\/li>\n<li>Access to a row-based storage engine that supports fast, single-row operations for transactional processing.<\/li>\n<li>The power to continuously replicate data in the analytical store (i.e., columnar-based storage in the background).<\/li>\n<li>A direction on which storage to use to keep data under the hood.<\/li>\n<\/ul>\n<p>In addition, with hybrid tables, Snowflake enforces the uniqueness of the primary index and referential integrity constraints for relationships between tables using primary keys and foreign keys. You can now join both hybrid tables and normal tables without changing any query structure.<\/p>\n<div id=\"attachment_46950\" style=\"width: 490px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/centricconsulting.com\/wp-content\/uploads\/2023\/09\/Snowflake-workflows.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-46950\" class=\"size-full wp-image-46950\" src=\"https:\/\/centricconsulting.com\/wp-content\/uploads\/2023\/09\/Snowflake-workflows.jpg\" alt=\"Centric Consulting - Snowflake's Unistore Architecture\" width=\"480\" height=\"272\" srcset=\"https:\/\/centricconsulting.com\/wp-content\/uploads\/2023\/09\/Snowflake-workflows.jpg 480w, https:\/\/centricconsulting.com\/wp-content\/uploads\/2023\/09\/Snowflake-workflows-300x170.jpg 300w\" sizes=\"(max-width: 480px) 100vw, 480px\" \/><\/a><p id=\"caption-attachment-46950\" class=\"wp-caption-text\">https:\/\/www.snowflake.com\/thankyou\/getting-started-with-transactional-and-analytical-data-in-snowflake\/<\/p><\/div>\n<p>With this architecture, the storage layer brings both row and columnar storage under one umbrella. <strong>Since new features support row locking, you can perform updates more efficiently.<\/strong> In the background, this data synchronizes to columnar storage, which is specific to historical tables.<\/p>\n<p>The biggest advantage is that it hides complexity from users. And, Snowflake lets you issue the query without worrying about how the data will be kept in the storage layer.<\/p>\n<p><strong>Syntax:<\/strong><br \/>\n<code>CREATE HYBRID TABLE Customers<br \/>\nCust_no number (25) PRIMARY KEY,<br \/>\nCust_name varchar (100),<br \/>\nOutstanding_Amt number (38,0),<br \/>\nCust_Phone number(20)<\/code><\/p>\n<p><code>Create the Invoice table with foreign key referencing the customer table<\/code><\/p>\n<p><code>CREATE OR REPLACE HYBRID TABLE Invoices<\/code><\/p>\n<p><code>Invoice_No number (25) PRIMARY KEY,<br \/>\nCust_no number (25),<br \/>\nInvoice_Amount number (38,0),<br \/>\nInvoice_Status varchar (20),<br \/>\nInvoice_Date timestamp_ntz,<\/code><\/p>\n<p><code>CONSTRAINT fk_custkey FOREIGN KEY (Cust_no) REFERENCES Customers (Cust_no),<\/code><\/p>\n<p><code>INDEX ind_date (Invoice_Date));<\/code><\/p>\n<p>To create a hybrid table, use HYBRID in CREATE syntax and define the primary or foreign key constraints like other relational tables. Snowflake enforces these constraints in the case of hybrid tables.<\/p>\n<h3>Boost Volume with Iceberg Tables<\/h3>\n<p>Let\u2019s face it: You\u2019ll need to handle large volumes of data if you want to offer effective internal analytics, gain insights into business growth potential, follow a proactive approach to customer retention, and stay competitive in general. At times, you may need to share these data with partners and research organizations. <strong>However, storing large volumes of sensitive and confidential information over the cloud \u2014 and potentially sharing it \u2014 can pose a <a href=\"https:\/\/centricconsulting.com\/blog\/blog-series-snowflake-security-and-data-privacy\/\">real security challenge<\/a>.<\/strong><\/p>\n<p>With Iceberg Tables, organizations can store big data on a cloud of their choice, like Amazon S3 or Azure Blob Storage, in the form of Parquet files. Since Iceberg supports dynamic data masking and row-level masking (all Snowflake native table features), it provides controlled access to and privacy for sensitive information.<\/p>\n<p><a href=\"https:\/\/centricconsulting.com\/blog\/how-snowflake-architecture-delivers-a-modern-data-storage-solution\/\">Data is stored in customer-supplied storage<\/a>, meaning multiple applications or tools outside Snowflake itself can use it. In fact, organizations no longer pay Snowflake for storage costs. Instead, the cloud providers bill for storage.<\/p>\n<p>Iceberg Tables mostly work like Snowflake native tables, but there are a couple of key exceptions:<\/p>\n<ol>\n<li>Table metadata comes in Iceberg format, i.e., JSON, metadata and data are all stored in customer-supplied storage.<\/li>\n<li>Data is stored in Parquet files, which bring high performance and effective compression.<\/li>\n<\/ol>\n<h2>Know the Difference: Iceberg Tables vs. Native Tables<\/h2>\n<p><a href=\"https:\/\/centricconsulting.com\/wp-content\/uploads\/2023\/09\/Blog_DA_Snowflake_Table_09062023.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-46967\" src=\"https:\/\/centricconsulting.com\/wp-content\/uploads\/2023\/09\/Blog_DA_Snowflake_Table_09062023.png\" alt=\"Centric Consulting Snowflake Table showing Iceberg vs Native Table features\" width=\"1400\" height=\"830\" srcset=\"https:\/\/centricconsulting.com\/wp-content\/uploads\/2023\/09\/Blog_DA_Snowflake_Table_09062023.png 1400w, https:\/\/centricconsulting.com\/wp-content\/uploads\/2023\/09\/Blog_DA_Snowflake_Table_09062023-300x178.png 300w, https:\/\/centricconsulting.com\/wp-content\/uploads\/2023\/09\/Blog_DA_Snowflake_Table_09062023-1024x607.png 1024w, https:\/\/centricconsulting.com\/wp-content\/uploads\/2023\/09\/Blog_DA_Snowflake_Table_09062023-768x455.png 768w, https:\/\/centricconsulting.com\/wp-content\/uploads\/2023\/09\/Blog_DA_Snowflake_Table_09062023-600x356.png 600w, https:\/\/centricconsulting.com\/wp-content\/uploads\/2023\/09\/Blog_DA_Snowflake_Table_09062023-992x588.png 992w, https:\/\/centricconsulting.com\/wp-content\/uploads\/2023\/09\/Blog_DA_Snowflake_Table_09062023-1200x711.png 1200w, https:\/\/centricconsulting.com\/wp-content\/uploads\/2023\/09\/Blog_DA_Snowflake_Table_09062023-850x504.png 850w, https:\/\/centricconsulting.com\/wp-content\/uploads\/2023\/09\/Blog_DA_Snowflake_Table_09062023-750x445.png 750w\" sizes=\"(max-width: 1400px) 100vw, 1400px\" \/><\/a><\/p>\n<p><strong>Syntax:<\/strong><br \/>\n<code>Create external volume pointing to the S3 bucket<\/code><br \/>\n<code>Create or replace external volume iceberg_int<\/code><\/p>\n<p><code>storage_locations =<br \/>\n(<\/code><\/p>\n<p style=\"padding-left: 40px;\"><code>(<\/code><\/p>\n<p style=\"padding-left: 40px;\"><code>name = 'my-s3-us-east-2'<\/code><\/p>\n<p style=\"padding-left: 40px;\"><code>storage_provider = 'S3'<\/code><\/p>\n<p style=\"padding-left: 40px;\"><code>storage_base_url = 's3:\/\/icebergpracticebucket1\/'<\/code><\/p>\n<p style=\"padding-left: 40px;\"><code>storage_aws_role_arn = 'arn:aws:iam::913267004595: role\/icebergrole'<\/code><\/p>\n<p style=\"padding-left: 40px;\"><code>)<\/code><br \/>\n<code>);<\/code><\/p>\n<p><code>Create an Iceberg Table using ICEBERG in create statement and point to external volume<\/code><\/p>\n<p><code>Create or replace Iceberg Table customer_detail with external_volume='iceberg_int'; as Select &lt;&lt;col1&gt;&gt;, &lt;&lt;col2&gt;&gt;&lt;&lt;coln&gt;&gt; from Table<\/code><\/p>\n<h2>Try these Snowflake Updates for Yourself<\/h2>\n<p>Want to know more? Take a look at Snowflake\u2019s documentation of these new features:<\/p>\n<ul>\n<li>Dynamic Tables: <a href=\"https:\/\/docs.snowflake.com\/en\/user-guide\/dynamic-tables-about\" target=\"_blank\" rel=\"noopener\">https:\/\/docs.snowflake.com\/en\/user-guide\/dynamic-tables-about<\/a><\/li>\n<li>Hybrid Tables: <a href=\"https:\/\/www.snowflake.com\/guides\/unistore\" target=\"_blank\" rel=\"noopener\">https:\/\/www.snowflake.com\/guides\/unistore<\/a><\/li>\n<li>Iceberg Tables: <a href=\"https:\/\/www.snowflake.com\/blog\/iceberg-tables-powering-open-standards-with-snowflake-innovations\/\" target=\"_blank\" rel=\"noopener\">https:\/\/www.snowflake.com\/blog\/iceberg-tables-powering-open-standards-with-snowflake-innovations\/<\/a><\/li>\n<\/ul>\n<p>To conclude, each table has a unique role in business, streamlining data pipelines and automating changes with Dynamic tables. Snowflake is introducing Hybrid or Unistore tables for improved management of both transactional and analytical data. If you want to use Snowflake features while keeping data outside Snowflake, consider Iceberg Tables for tasks like Masking, Access Policies, Cloning, and more.<\/p>\n\n        <div class=\"inline-cta purple\">\n            <div class=\"inline-cta--content\">\n                Data governance is essential to creating trustworthy, sustainable and repeatable value through data. What does that mean for you?\n            <\/div>\n            <div class=\"inline-cta--button\">\n                <a\n                    class=\"button\"\n                    href=\"https:\/\/go.centricconsulting.com\/NAT-FY22-09-WBNR-DataGovernanceHowtoSucceedandWheretoStart_01LandingPage-OnDemand.html\"\n                    target=\"_blank\"\n                    >\n\n                    Watch Our Webinar\n                <\/a>\n            <\/div>\n        <\/div>\n","protected":false},"excerpt":{"rendered":"<p>In our blog, we delve the latest Snowflake updates, including new tables, and we explain how they can simplify daily data management.<\/p>\n","protected":false},"author":348,"featured_media":46964,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_oasis_is_in_workflow":0,"_oasis_original":0,"_oasis_task_priority":"","_relevanssi_hide_post":"","_relevanssi_hide_content":"","_relevanssi_pin_for_all":"","_relevanssi_pin_keywords":"","_relevanssi_unpin_keywords":"","_relevanssi_related_keywords":"","_relevanssi_related_include_ids":"","_relevanssi_related_exclude_ids":"","_relevanssi_related_no_append":"","_relevanssi_related_not_related":"","_relevanssi_related_posts":"","_relevanssi_noindex_reason":"","footnotes":""},"categories":[1],"tags":[18616],"coauthors":[23230,23780],"class_list":["post-46943","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized","tag-data-and-analytics","resource-categories-blogs","orbitmedia_post_topic-data-analytics"],"acf":[],"publishpress_future_action":{"enabled":false,"date":"2025-03-27 02:43:40","action":"change-status","newStatus":"draft","terms":[],"taxonomy":"category"},"publishpress_future_workflow_manual_trigger":{"enabledWorkflows":[]},"_links":{"self":[{"href":"https:\/\/centricconsulting.com\/wp-json\/wp\/v2\/posts\/46943"}],"collection":[{"href":"https:\/\/centricconsulting.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/centricconsulting.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/centricconsulting.com\/wp-json\/wp\/v2\/users\/348"}],"replies":[{"embeddable":true,"href":"https:\/\/centricconsulting.com\/wp-json\/wp\/v2\/comments?post=46943"}],"version-history":[{"count":0,"href":"https:\/\/centricconsulting.com\/wp-json\/wp\/v2\/posts\/46943\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/centricconsulting.com\/wp-json\/wp\/v2\/media\/46964"}],"wp:attachment":[{"href":"https:\/\/centricconsulting.com\/wp-json\/wp\/v2\/media?parent=46943"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/centricconsulting.com\/wp-json\/wp\/v2\/categories?post=46943"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/centricconsulting.com\/wp-json\/wp\/v2\/tags?post=46943"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/centricconsulting.com\/wp-json\/wp\/v2\/coauthors?post=46943"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}