TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Understanding Parquet, Iceberg and Data Lakehouses

312 点作者 davidgomes超过 1 年前

24 条评论

twoodfin超过 1 年前
I often hear references to Apache Iceberg and Delta Lake as if they’re two peas in the Open Table Formats pod. Yet…<p>Here’s the Apache Iceberg table format specification:<p><a href="https:&#x2F;&#x2F;iceberg.apache.org&#x2F;spec&#x2F;" rel="nofollow">https:&#x2F;&#x2F;iceberg.apache.org&#x2F;spec&#x2F;</a><p>As they like to say in patent law, anyone “skilled in the art” of database systems could use this to build and query Iceberg tables without too much difficulty.<p>This is nominally the Delta Lake equivalent:<p><a href="https:&#x2F;&#x2F;github.com&#x2F;delta-io&#x2F;delta&#x2F;blob&#x2F;master&#x2F;PROTOCOL.md">https:&#x2F;&#x2F;github.com&#x2F;delta-io&#x2F;delta&#x2F;blob&#x2F;master&#x2F;PROTOCOL.md</a><p>I defy anyone to even scope out what level of effort would be required to fully implement the current spec, let alone what would be involved in keeping up to date as this beast evolves.<p>Frankly, the Delta Lake spec reads like a reverse engineering of whatever implementation tradeoffs Databricks is making as they race to build out a lakehouse for every Fortune 1000 company burned by Hadoop (which is to say, most of them).<p>My point is that I’ve yet to be convinced that buying into Delta Lake is actually buying into an open ecosystem. Would appreciate any reassurance on this front!<p>Editing to append this GitHub history, which is unfortunately not reassuring:<p><a href="https:&#x2F;&#x2F;github.com&#x2F;delta-io&#x2F;delta&#x2F;commits&#x2F;master&#x2F;PROTOCOL.md">https:&#x2F;&#x2F;github.com&#x2F;delta-io&#x2F;delta&#x2F;commits&#x2F;master&#x2F;PROTOCOL.md</a><p>Random features and tweaks just popping up, PR’d by Databricks engineers and promptly approved by Databricks senior engineers…
评论 #38813077 未加载
评论 #38815179 未加载
评论 #38813725 未加载
评论 #38813071 未加载
评论 #38873303 未加载
评论 #38813837 未加载
评论 #38817078 未加载
wenc超过 1 年前
Great article. I&#x27;ve worked with Parquet files on S3 for years, but I didn&#x27;t quite understand what Iceberg was, but the article explained it well. It&#x27;s a database metadata format for an underlying set of data which describes its schema, partitioning etc.<p>Most people use Hive partitioning convention (i.e. directory names like &#x2F;key3=000&#x2F;key2=002&#x2F;) but Iceberg goes farther than this by exposing even more structure to the query engine.<p>In a traditional DBMS like Postgres, the schema, the query engine and the storage format come as a single package.<p>But with big data, we&#x27;re building database components from scratch, and we can mix and match. We can use Iceberg as a metadata format, DuckDB as the query engine, Parquet as the storage format, and S3 as the storage medium.
评论 #38814166 未加载
benjaminwootton超过 1 年前
This is a big deal in the database world as delta, iceberg and hudi mean that data is being stored in an open source format, often on S3.<p>It means that the storage and much of the processing is being standrdised so that you can move between databases easily and almost all tools will eventually be able to work with the same set of files in a transactionally sound way.<p>For instance, Snowflake could be writing to a file, a data scientist could be querying the data live from a Jupyter notebook, and ClickHouse could be serving user facing analytics against the same data with consistency guarantees.<p>If the business then decide to switch Snowflake to Databricks then it isn’t such a big deal.<p>Right now it isn’t quite as fast to query these formats on S3 as a native ingestion would be, but every database vendor will be forced by the market to optimise for performance such that they tend towards the performance of natively ingested data.<p>It’s a great win for openness and open source and for businesses to have their data in open and portable formats.<p>Lakehouse has the same implications. Lots of companies have data lakes and data warehouses and end up copying data between the two. To query the same set of data and have just one system to manage is equally impactful.<p>It’s a very interesting time to be in the data engineering world.
评论 #38813615 未加载
评论 #38814679 未加载
评论 #38815722 未加载
jamesblonde超过 1 年前
I disagree with this strongly - &quot;The best way to store Apache Arrow dataframes in files on disk is with Feather. However, it’s also possible to convert to Apache Parquet format and others.&quot;<p>The best way to build your own non-JVM lakehouse is to use Iceberg for metadata, Parquet for the Data, Query with DuckDB using Arrow tables (read Parquet directly into Arrow is very low cost), and then use Arrow-&gt;Pandas or Polars (either directly or via a service with Arrow Flight).<p>If you put Feather in the mix, the whole Python lakehouse stack doesn&#x27;t currently work.
评论 #38820455 未加载
debo_超过 1 年前
I&#x27;ve heard of data lakes, but &quot;data lakehouse&quot; sounds like where upper class data goes in the summer to take their data-boats data-fishing.
评论 #38813252 未加载
评论 #38815018 未加载
评论 #38816096 未加载
alentred超过 1 年前
I am very excited about Iceberg specifically (because open-source), but the last time I looked into it the only implementation was a Spark library, and Trino&#x27;s (formerly Presto, an SQL engine) Iceberg connector had a hard dependency on Hive! It is like the entire industry had a hard time divorcing its MapReduce, Hive, and dare I to say Spark, legacy.<p>I didn&#x27;t look into Iceberg since, but plan to, and I am really looking forward for this to develop. We have the tools and the compute power today to deal with data without legacy tech, and not all data is big data either. Consequently &quot;data engineering&quot;, thankfully, resembles the regular back-end development more and more, with its regular development practices being put in place.<p>So, here is to the hope of having a pure Python Iceberg lib some day very soon!
评论 #38824142 未加载
评论 #38815174 未加载
throwitaway222超过 1 年前
Why is no one able to describe all this with more concrete ideas, like this is how you store data, this is how you connect and query - and how fast those queries will be (ie transactional speed vs &quot;analytics&quot; speed).
lysecret超过 1 年前
I am currently working with about 100TB data on GCP with BigQuery as a query engine and simple hive partitioning like &#x2F;key3=000&#x2F;key2=002&#x2F;. We are happy because we can run all the queries you want and it is insanely cheap. But latency is reaching quite high levels (it doesn&#x27;t matter so much for us) but I was wondering, if implementing Iceberg would improve this? Has anyone experience with this?<p>Overall this kind of architecture is just awesome.
评论 #38816352 未加载
评论 #38817571 未加载
评论 #38815760 未加载
评论 #38818991 未加载
Lyngbakr超过 1 年前
&gt; <i>However, this blog post won’t be 100% comprehensive, or even the best starting point for most people. That’s because I’m writing this for myself. I find that the best way to learn new things is by &quot;forcing myself&quot; to re-explain them to others.</i><p>I really like this attitude and have started embracing it myself both on paper and in notes on my website.
lmeyerov超过 1 年前
We have been excited to dig into the Iceberg era of more managed parquet storage... But they are still years behind on supporting fast GPU IO (GPUDirect&#x2F;cuFile). So every time we look at bringing them to a customer for powering AI workloads... We hit that wall.<p>It seems inevitable, more of a when vs if. Being able to have our cake &amp; eat it too will be very cool :)
评论 #38813509 未加载
hawaiianSpork超过 1 年前
Parquet has been the lakehouse file format of choice for nearly half a decade. But we are starting to see other contenders that are optimized more for lower latency like lance <a href="https:&#x2F;&#x2F;github.com&#x2F;lancedb&#x2F;lance">https:&#x2F;&#x2F;github.com&#x2F;lancedb&#x2F;lance</a>
评论 #38815102 未加载
berniedurfee超过 1 年前
No mention of Hudi? I really liked using Hudi in a recent project. It feels so close to hitting that maturity level where it’s viable for a small team to maintain without introducing too many living parts.<p>Overall, I like the whole concept of the Lakehouse because it can be done cheaply.<p>Most datalakes turn into swamps pretty quickly, so cheaper is better.<p>Let it sit unused for a while in S3 and then quietly nuke it without burning money on a big compute environment.
albert_e超过 1 年前
Sorry genuine question -- what does the phrase &quot;at Broad&quot; at the end of the blog post&#x27;s title mean or refer to? Maybe a phrase that I am unfamiliar with? I first wondered if it is the name of an organization or team -- and this post is describing what they did in that team, but that doesn&#x27;t seem to be the case?<p>&gt;&gt; Understanding Parquet, Iceberg and Data Lakehouses at Broad
评论 #38815080 未加载
评论 #38812810 未加载
alexott超过 1 年前
Unity Catalog isn’t comparable with Iceberg Catalogs. It’s not required for Delta to function…<p>There was a paper at VLDB about Delta Lake: <a href="https:&#x2F;&#x2F;www.vldb.org&#x2F;pvldb&#x2F;vol13&#x2F;p3411-armbrust.pdf" rel="nofollow">https:&#x2F;&#x2F;www.vldb.org&#x2F;pvldb&#x2F;vol13&#x2F;p3411-armbrust.pdf</a> - it describes why it was created, plus details of implementation.
pitah1超过 1 年前
Good in-depth insights into each format. This complements nicely with a site I created called tech-diff (<a href="https:&#x2F;&#x2F;tech-diff.com&#x2F;file&#x2F;" rel="nofollow">https:&#x2F;&#x2F;tech-diff.com&#x2F;file&#x2F;</a>) where it provides a summary of the file formats.
评论 #38818418 未加载
fancy_pantser超过 1 年前
I know it&#x27;s a newcomer still under heavy development, but I&#x27;m surprised to not see Lance (and Lancedb atop it) mentioned. It crushes ORC and Parquet for most real-world data scenarios and has cheap data versioning.
Nelkins超过 1 年前
In every benchmark I&#x27;ve looked at online, Delta Lake format seems to have drastically better performance than Iceberg. Is this fundamental to the spec, or is it possible that Iceberg can close the gap?
Boxxed超过 1 年前
One thing I&#x27;m confused about is why does Iceberg need a spark deployment to function? Or am I wrong about that? I would rather avoid that ecosystem if I can.
评论 #38813479 未加载
评论 #38813238 未加载
jbmsf超过 1 年前
I appreciate the clarity of this article. I know it was written by the author for themselves, but it feels like it could have been written for me!
aejm超过 1 年前
I really liked your article.<p>Is this a typo: “Hive, Delta Lake and Iceberg all support support of schema registry or metastore.”?
评论 #38823414 未加载
mulmen超过 1 年前
How do dependencies work in this type of data lakehouse? Does the orchestration layer handle that or is there metadata within the data lake that provides completeness information?
评论 #38815187 未加载
plopz超过 1 年前
Are these formats appropriate for multi dimensional gridded data or are hdf&#x2F;netcdf still what people use for those?
评论 #38816942 未加载
wokwokwok超过 1 年前
It&#x27;s really easy to get lost in the technical jargon that the <i>vendors</i> who are <i>selling products</i> throw around, but this article has missed the important part, and spent all the time talking about the relatively unimportant part (data formats).<p>You need to step back and look from a broader perspective to understand this domain.<p>Talking about arrow&#x2F;parquet&#x2F;iceberg is like talking about InnoDB vs MyISAM when you&#x27;re talking about databases; yes, those are technically storage engines for mysql&#x2F;mariadb, but no, you probably do not care about them until you need them, and you most certainly do not care about them when you want to understand what a relational DB vs. an no-SQL db are.<p>They are <i>technical details</i>.<p>...<p>So, if you step back, what you need to read about is <i>STAR SCHEMAS</i>. Here are some links (1), (2).<p>This is what people used to be before data lakes.<p>So the tldr: you have a big database which contains <i>condensed and annotated</i> versions of your data, which is easy to query, and structured in a way that is suitable for visualization tools such as PowerBI, Tableau, MicroStrategy (ugh, but people do use it), etc. to use.<p>This means you can generate <i>reports and insights</i> from your data.<p>Great.<p>...the problem is that generating this structured data from absolutely massive amounts of unstructured data involves a truly colossal amount of engineering work; and it&#x27;s never realtime.<p>That&#x27;s because the process of turning <i>raw data</i> into <i>a star schema</i> was traditionally done via ETL tools that were slow and terrible. &#x27;Were&#x27;. These tools are still slow and terrible.<p>Basically, the output you get is very valuable, but <i>getting it</i> is very difficult, very expensive and both of those problems scale as the data size scales.<p>So...<p>Datalakes.<p>Datalakes are the solution to this problem; you don&#x27;t transform the data. You just injest it and store it, basically raw, and <i>on the fly</i> when you need the data for something, you can process it.<p>The idea was something like a dependency graph; what if, instead of processing all your data every day&#x2F;hour&#x2F;whatever, you defined what data you needed, and then when you need it, you rebuild just that part of the database.<p>Certainly you don&#x27;t get the nice star schema, but... you can handle a lot of data, and what you need to do process it &#x27;adhoc&#x27; is pretty trivial mostly, so you don&#x27;t need a huge engineering effort to support it; you just need some smart <i>table formats</i>, a <i>lot of storage</i> and on-demand compute.<p>...Great?<p>No. Totally rubbish.<p>Turn out this is a stupid idea, and what you get is a lot of data you can&#x27;t get any insights from.<p>So, along come the &#x27;nextgen&#x27; batch of BI companies like databricks so they invent this idea of a &#x27;lake house&#x27; (3), (4).<p>What is it? Take a wild guess. I&#x27;ll give you a hint: having no tables was a stupid idea.<p>Yes! Correct, they&#x27;ve invented a layer that sits on top of a data lake that presents a &#x27;virtual database&#x27; with ACID transactions that you then build a star schema in&#x2F;on.<p>Since the underlying implementation is (magic here, etc. etc. technical details) this approach supports output in the form we originally had (structured data suitable for analytics tools), but it has some nice features like streaming, etc. that make it capable of handling very large volumes of data; but it&#x27;s not a &#x27;real&#x27; database, so it does have some limitations which are difficult to resolve (like security and RBAC).<p>...<p>Of course, the promise, that you just pour all your data in and &#x27;magic!&#x27; you have insights, is still just as much nonsense as it ever was.<p>If you use any of these tools now, you&#x27;ll see that they require you to transform your data; usually as some kind of batch process.<p>If you closed your eyes and said &quot;ETL?&quot;, you&#x27;d win a cookie.<p>All a &#x27;lake house&#x27; is, is a traditional BI data warehouse built on a different type of database.<p>Almost without exception, everything else is marketing fluff.<p>* exception: kafka and streaming is actually fundamentally different for real time aggregated metrics, but its also fabulously difficult to do well, so most people still don&#x27;t, as far as I&#x27;m aware.<p>...and I&#x27;ll go out on a limb here and say really, you probably do not care if your implementation uses delta tables or iceberg; that&#x27;s an implementation detail.<p>I <i>guarantee</i> that correctly understanding your domain data and modelling a form of it suitable for reporting and insights is more important and more valuable than what storage engine you use.<p>[1] - <a href="https:&#x2F;&#x2F;learn.microsoft.com&#x2F;en-us&#x2F;power-bi&#x2F;guidance&#x2F;star-schema" rel="nofollow">https:&#x2F;&#x2F;learn.microsoft.com&#x2F;en-us&#x2F;power-bi&#x2F;guidance&#x2F;star-sch...</a> [2] - <a href="https:&#x2F;&#x2F;www.kimballgroup.com&#x2F;data-warehouse-business-intelligence-resources&#x2F;books&#x2F;data-warehouse-dw-toolkit&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.kimballgroup.com&#x2F;data-warehouse-business-intelli...</a><p>[3] - <a href="https:&#x2F;&#x2F;www.snowflake.com&#x2F;guides&#x2F;what-data-lakehouse" rel="nofollow">https:&#x2F;&#x2F;www.snowflake.com&#x2F;guides&#x2F;what-data-lakehouse</a> [4] - <a href="https:&#x2F;&#x2F;www.databricks.com&#x2F;glossary&#x2F;data-lakehouse" rel="nofollow">https:&#x2F;&#x2F;www.databricks.com&#x2F;glossary&#x2F;data-lakehouse</a>
评论 #38813988 未加载
评论 #38817545 未加载
评论 #38813650 未加载
评论 #38815490 未加载
评论 #38821821 未加载
评论 #38815291 未加载
评论 #38813992 未加载
meehai超过 1 年前
can confirm that it is a nice thing to work with parquet files. Before this, we&#x27;ve worked for ~1 year with CSVs (I know the horror) and we made an effort to port all the &#x27;legacy&#x27; code to Parquet files<p>We interface with BigQuery (via Airflow) mostly, and except one very annoying situation it&#x27;s a big improvement in terms of speed (parsing floats after querying the DB is NEVER a good option).<p>---<p>In case anyone&#x27;s wondering, it&#x27;s basically storing and loading native numpy arrays in BigQuery via the python client(s).<p>You have a bunch of options (assume you have one or more cols with float32 numpy arrays):<p>- dataframe -&gt; to_parquet -&gt; upload to GCS -&gt; GCSToBigQueryOperator (<a href="https:&#x2F;&#x2F;airflow.apache.org&#x2F;docs&#x2F;apache-airflow-providers-google&#x2F;stable&#x2F;_api&#x2F;airflow&#x2F;providers&#x2F;google&#x2F;cloud&#x2F;transfers&#x2F;gcs_to_bigquery&#x2F;index.html" rel="nofollow">https:&#x2F;&#x2F;airflow.apache.org&#x2F;docs&#x2F;apache-airflow-providers-goo...</a>)<p><pre><code> -&gt; instead of storing as a `FLOAT, REPEATED` it will be stored as a STRUCT with a structure of `list&gt;item` OR `list&gt;element` (pyarrow==11 OR pyarrow==13).This requires a manual parsing from this &#x27;json structure&#x27; that you get when querying the DB back to np.array -&gt; slow and basically you are using CSVs again. -&gt; Read more: https:&#x2F;&#x2F;stackoverflow.com&#x2F;questions&#x2F;68303327&#x2F;unnecessary-list-item-nesting-in-bigquery-schemas-from-pyarrow-upload-dataframe -&gt; set the schema before uploading? Nope, all values will uploaded as null in BQ. </code></pre> - dataframe -&gt; bigquery.Client -&gt; upload the dataframe from python<p><pre><code> - very slow, you need to batch your data (imagine 24h vs 5 minutes kind of slow as dataframe sizes increase + necessity to keep all data in memory or batch it so extra save&#x2F;load of each batch before uploading) - arrays are stored properly </code></pre> - solution: you must do 2 things, one on the pyarrow side and one on the BigQuery side<p><pre><code> - `df.to_parquet(..., use_compliant_nested_type=True)` (in pyarrow==14 it&#x27;s True by default, but airflow needs pyarrow==11, where it&#x27;s False by default) - use `enable_list_inference=True` (link: https:&#x2F;&#x2F;cloud.google.com&#x2F;bigquery&#x2F;docs&#x2F;loading-data-cloud-storage-parquet#list_logical_type) - when both of this are true (i.e. save parquet files [to GCS] using that flag and load parquet files [from GCS to BQ] using the other flag arrays can be stored as (FLOAT, REPEATED) and queried as numpy arrays out of the box without any manual management. </code></pre> This took me like 1 week of debugging and reading source code, obscure SO comments and GH issues etc.
评论 #38818376 未加载