<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Abe Chen on Medium]]></title>
        <description><![CDATA[Stories by Abe Chen on Medium]]></description>
        <link>https://medium.com/@abe.chen.tw?source=rss-70d378e9de2e------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*iQ8QYyJYbQqRy4Y55hMSwA.jpeg</url>
            <title>Stories by Abe Chen on Medium</title>
            <link>https://medium.com/@abe.chen.tw?source=rss-70d378e9de2e------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 17 Nov 2026 07:29:24 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@abe.chen.tw/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[KKday 資料分析平台系列 (1) - 資料架構篇]]></title>
            <link>https://medium.com/kkdaytech/kkday-%E8%B3%87%E6%96%99%E5%88%86%E6%9E%90%E5%B9%B3%E5%8F%B0%E7%B3%BB%E5%88%97-1-%E8%B3%87%E6%96%99%E6%9E%B6%E6%A7%8B%E7%AF%87-984a77b14d22?source=rss-70d378e9de2e------2</link>
            <guid isPermaLink="false">https://medium.com/p/984a77b14d22</guid>
            <category><![CDATA[data-architecture]]></category>
            <category><![CDATA[data]]></category>
            <category><![CDATA[data-analysis]]></category>
            <category><![CDATA[data-engineering]]></category>
            <category><![CDATA[etl]]></category>
            <dc:creator><![CDATA[Abe Chen]]></dc:creator>
            <pubDate>Mon, 03 Oct 2022 01:45:18 GMT</pubDate>
            <atom:updated>2023-01-04T16:08:21.066Z</atom:updated>
            <content:encoded><![CDATA[<h4>Data Warehouse, Data Lake or Data Lakehouse</h4><figure><img alt="Photo by Nathan Anderson on Unsplash" src="https://cdn-images-1.medium.com/max/1024/1*T4TjmwKdAmWDGfEOiG6HkQ.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@nathananderson">Nathan Anderson</a> on <a href="https://unsplash.com/">Unsplash</a></figcaption></figure><p>多數企業在數位轉型的過程中，嘗試發展數據力，藉由導入資料庫、資料倉儲、商業智慧，第一時間洞察企業內部龐大的資料，以解決企業內部，或是解決商業問題、挖掘商機，但隨著企業的發展，資料量持續增加、資料類型也越趨多元，<strong>敏捷、彈性的資料架構能夠提高運用資料的團隊的生產力，成為企業與競爭者之間拉開差距的關鍵之一</strong>。</p><p>本文將會從資料架構發展演進依序介紹資料倉儲 (Data Warehouse) 、資料湖 (Data Lake) 與 Data Lakehouse。</p><h3>資料倉儲 (Data Warehouse) 與資料湖 (Data Lake)</h3><p>資料倉儲 (Data Warehouse)與資料湖 (Data Lake)可以算是資料工作者必備的知識，在網路上有許多專業的文章很詳細地介紹，筆者在下方整理列出兩者的比較，並帶著讀者快速回顧。</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*62JSaaZuRrPrV4WBocwH1A.png" /><figcaption>Data Warehouse vs. Data Lake — Image from author</figcaption></figure><h3><strong>資料倉儲(Data Warehouse)</strong></h3><p>資料倉儲(Data Warehouse)起源於 1980 年前後，它是一個統一的資料儲存庫，主要儲存結構化資料，也能有限的支持如 Json 的半結構化資料。資料倉儲是依靠 ETL 機制從多個資料來源取得(Extract)資料，經過轉換(Transform)後將資料載入(Load)到倉儲裡面。倉儲代表企業中所有資料單一的來源，並支持商業決策和商業智慧(Business Intelligence, BI)，進一步提升企業在商業的洞察力。</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*H_4o4TcQDumK0j73pbSD4w.png" /><figcaption>The Data Warehouse Pattern - Image from author</figcaption></figure><h3><strong>資料湖(Data Lake)</strong></h3><p>隨著商業需求的產生與技術的發展，企業越來越多應用場景必須處理如非結構化的文章、圖片、影片、音訊等越來越常見的資料格式，傳統資料倉儲無法處理在這類非結構化的資料。且傳統資料倉儲儲存成本高，不是儲存大量資料最具成本效益考量的方法，於是在 2010 年前後出現了資料湖(Data Lake)，試圖解決這些問題。</p><p>資料湖(Data Lake)是一個集中、彈性高的儲存架構，與儲存經過資料清理(data cleaning)後資料的資料倉儲(Data Warehouse)相比，資料湖以低成本、靈活地儲存大量原始資料形式的結構化、半結構化、非結構化資料，常見的如 Google Cloud Storage (GCS)、AWS S3 等都可以被定義是數據湖。在資料進入資料湖之前，不需要滿足特定的資料 schema，而是在使用資料時才被定義，使企業能夠從非結構化數據中獲得更多洞察結果。</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Z2J_nNp4JDONi1VnKEzbTg.png" /><figcaption>The Data Lake Pattern — Image from author</figcaption></figure><p>雖然資料湖的設計初衷是解決資料倉儲遇到的挑戰，諸如資料格式支援性不足、儲存非常大量資料的容量與成本問題等，但它不支援 ACID、有較差的資料品質、不被保證的資料可靠性和資料完整性、查詢效能不佳，並且需要搭配其它工具和技術來對資料執行 SQL 查詢，導致資料都往資料湖儲存，但最終這些資料仍無法直接使用，存在資料治理的問題，形成了資料沼澤(Data Swamp)。</p><p>因為資料倉儲和資料湖都不是能解決所有問題的唯一解，許多企業在實務上會在當要真正使用資料的時候，再將資料放到多個資料倉儲中使用，形成混合式的資料架構(如下圖)，如此一來企業內就必須同時維護一個資料倉儲系統與一個資料湖系統，提高了企業成本與資料架構複雜度。</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ayyhCTx6TCXxbHgZB62JGQ.png" /><figcaption>The two-tier data architecture — Image from author</figcaption></figure><p>試想一個情境，若我們有多個 ETL pipeline 要將資料從企業內部的資料庫移動到資料湖，再從資料湖移動到多個資料倉儲， 當中的每一個 ETL Tasks 都有可能發生延遲與故障，使得要維持每一個副本資料與源頭的一致性，更增添困難與複雜度。</p><p>因此，新的資料架構 — Data Lakehouse <strong>結合了資料倉儲與資料湖各別的優勢成一個新的資料架構來解決各別的限制</strong>。Lakehouse 基於低成本的 storage 儲存大量保持原始的形式的資料，運用了資料湖的特色，<strong>並且直接在資料湖之上提供資料倉儲的性能和管理功能</strong>，從而降低維運成本、架構複雜度。</p><h3>Data Lakehouse</h3><p>Data Lakehouse，對岸有人將之翻譯為湖倉一體，是由 <a href="https://databricks.com/">Databricks</a> 於 2020 年在 <a href="https://databricks.com/blog/2020/01/30/what-is-a-data-lakehouse.html"><strong><em>What Is a Lakehouse?</em></strong></a> 一文中提出的概念，文中定義 Lakahouse：</p><blockquote>A lakehouse is a new, open architecture that combines the best elements of data lakes and data warehouses. — <a href="https://databricks.com/blog/2020/01/30/what-is-a-data-lakehouse.html">What Is a Lakehouse?</a></blockquote><p><a href="https://databricks.com/blog/2020/01/30/what-is-a-data-lakehouse.html"><strong><em>What Is a Lakehouse?</em></strong></a><strong><em> </em></strong>文中提到了 Lakahouse 具備的關鍵特色，從原文描述比較能完整得到解釋，筆者直接列於下方不多做解釋與翻譯，這些特色點出了 Lakehouse 能夠在<strong>支援性</strong>、<strong>可靠性</strong>、<strong>易用性</strong>三的面向帶來優勢：</p><ul><li><strong>Transaction support:</strong> In an enterprise lakehouse many data pipelines will often be reading and writing data concurrently. <strong>Support for ACID transactions</strong> ensures consistency as multiple parties concurrently read or write data, typically using SQL.</li><li><strong>Schema enforcement and governance:</strong> The Lakehouse <strong>should have a way to support schema enforcement and evolution</strong>, supporting DW schema architectures such as star/snowflake-schemas. The system should be able to <a href="https://databricks.com/blog/2019/08/21/diving-into-delta-lake-unpacking-the-transaction-log.html">reason about data integrity</a>, and it <strong>should have robust governance and auditing mechanisms</strong>.</li><li><strong>BI support:</strong> Lakehouses <strong>enable using BI tools directly on the source data</strong>. This reduces staleness and improves recency, reduces latency, and lowers the cost of having to operationalize two copies of the data in both a data lake and a warehouse.</li><li><strong>Storage is decoupled from compute:</strong> In practice this means <strong>storage and compute use separate clusters</strong>, thus these systems are able to scale to many more concurrent users and larger data sizes. Some modern data warehouses also have this property.</li><li><strong>Openness:</strong> The storage formats they use are open and standardized, such as Parquet, and they provide an API so a variety of tools and engines, including machine learning and Python/R libraries, can <strong>efficiently access the data directly</strong>.</li><li><strong>Support for diverse data types ranging from unstructured to structured data</strong>: The lakehouse can be used to store, refine, analyze, and access data types needed for many new data applications, including images, video, audio, semi-structured data, and text.</li><li><strong>Support for diverse workloads: </strong>including data science, machine learning, and SQL and analytics. Multiple tools might be needed to support all these workloads but they all rely on the same data repository.</li><li><strong>End-to-end streaming:</strong> Real-time reports are the norm in many enterprises. <strong>Support for streaming</strong> eliminates the need for separate systems dedicated to serving real-time data applications.</li></ul><p>在 2021 年第十一屆的 <a href="https://www.cidrdb.org/">Conference on Innovative Data Systems Research (CIDR)</a>，由來自 <a href="https://databricks.com/">Databricks</a>、UC Berkeley、Stanford University 的幾位專家在所發表的論文 <a href="https://www.cidrdb.org/cidr2021/papers/cidr2021_paper17.pdf"><em>Lakehouse: A New Generation of Open Platforms that Unify Data Warehousing and Advanced Analytics</em></a>，詳細地說明 Data Lakehouse 的架構與實作細節。</p><p>論文中說明 Lakehouse 的架構(下圖)，它將資料的儲存和運算分離，資料儲存在資料湖上，並且加入 Metadata 層，這一層能夠在低成本的資料湖儲存上增加資料管理的功能，包括 ACID、資料版本控制、權限管理、快取、索引。資料的運算處理則是在 Metadata 層之上，可以透過 SQL API 直接讀取資料湖中的原始資料用於 BI 與 Reports，也可以透過 Declarative DataFrame API 將原始資料用於資料科學和機器學習應用。</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/678/0*P7Br1MO4q9A891aS.png" /><figcaption>Lakehouse architecture- Image from <a href="https://www.cidrdb.org/cidr2021/papers/cidr2021_paper17.pdf">paper</a></figcaption></figure><h3>Data Lakehouse 真的有這麼神？</h3><p>新的資料架構皆是為了解決不斷發展和產生的商業需求而迭代產生的，但是 Data Lakehouse 是否已是當今企業的最佳選擇嗎？</p><ul><li><strong>技術尚未成熟</strong>： Data Lakehouse 仍是個相對新且不成熟的架構，仍有許多本身架構待解決或是優化的問題，以資料架構發展歷史經驗來看，Lakehoust 可能仍需數年的時間才能與成熟的資料架構或解決方案競爭。</li><li><strong>統一架構是雙面刃</strong>：雖然 Lakehouse 如此大一統的資料架構，看似解決了維護與資料一致性的問題，但在實務應用上是否會因此缺乏靈活性，難以同時滿足所有資料使用者的需求。</li><li><strong>架構也需適才適所</strong>：「<strong>沒有最好的架構，只有最適合的架構</strong>。」在企業內建置資料架構的過程，會綜合從企業資料規模、資料型態、規劃使用資料來解決的商業問題等各個面向，來評估何種資料架構是適合企業的，而非一昧的追求最新、最潮的解決方案。</li></ul><h3>What’s Next?</h3><p>透過此篇的介紹先讓讀者對各類型資料架構的概念有所了解，本系列文章後續會介紹 <a href="https://www.kkday.com/zh-tw">KKday</a> 在參考了這些資料架構之後，如何在 Cloud 上建置資料分析平台 (Data Analytics Platform, DAP)，讓 <a href="https://www.kkday.com/zh-tw">KKday</a> 的夥伴們 end-to-end 實作資料應用專案。</p><h3>Reference</h3><ul><li><a href="https://databricks.com/blog/2020/01/30/what-is-a-data-lakehouse.html">What Is a Lakehouse? - The Databricks Blog</a></li><li><a href="https://databricks.com/blog/2021/02/04/how-data-lakehouses-solve-common-issues-with-data-warehouses.html">How Lakehouses Solve Common Issues With Data Warehouses</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=984a77b14d22" width="1" height="1" alt=""><hr><p><a href="https://medium.com/kkdaytech/kkday-%E8%B3%87%E6%96%99%E5%88%86%E6%9E%90%E5%B9%B3%E5%8F%B0%E7%B3%BB%E5%88%97-1-%E8%B3%87%E6%96%99%E6%9E%B6%E6%A7%8B%E7%AF%87-984a77b14d22">KKday 資料分析平台系列 (1) - 資料架構篇</a> was originally published in <a href="https://medium.com/kkdaytech">KKday Tech Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>