Close Menu
    Trending
    • STOP Building Useless ML Projects – What Actually Works
    • Credit Risk Scoring for BNPL Customers at Bati Bank | by Sumeya sirmula | Jul, 2025
    • The New Career Crisis: AI Is Breaking the Entry-Level Path for Gen Z
    • Musk’s X appoints ‘king of virality’ in bid to boost growth
    • Why Entrepreneurs Should Stop Obsessing Over Growth
    • Implementing IBCS rules in Power BI
    • What comes next for AI copyright lawsuits?
    • Why PDF Extraction Still Feels LikeHack
    AIBS News
    • Home
    • Artificial Intelligence
    • Machine Learning
    • AI Technology
    • Data Science
    • More
      • Technology
      • Business
    AIBS News
    Home»Artificial Intelligence»Parquet File Format – Everything You Need to Know!
    Artificial Intelligence

    Parquet File Format – Everything You Need to Know!

    Team_AIBS NewsBy Team_AIBS NewsMay 14, 2025No Comments9 Mins Read
    Share Facebook Twitter Pinterest LinkedIn Tumblr Reddit Telegram Email
    Share
    Facebook Twitter LinkedIn Pinterest Email


    the quantity of Data rising exponentially in the previous couple of years, one of many largest challenges has turn out to be discovering probably the most optimum solution to retailer varied knowledge flavors. Not like within the (not thus far) previous, when relational databases had been thought-about the one solution to go, organizations now wish to carry out evaluation over uncooked knowledge – consider social media sentiment evaluation, audio/video information, and so forth – which normally couldn’t be saved in a conventional (relational) means, or storing them in a conventional means would require vital time and effort, which improve the general time-for-analysis.

    One other problem was to by some means stick to a conventional strategy to have knowledge saved in a structured means, however with out the need to design advanced and time-consuming ETL workloads to maneuver this knowledge into the enterprise knowledge warehouse. Moreover, what if half of the information professionals in your group are proficient with, let’s say, Python (knowledge scientists, knowledge engineers), and the opposite half (knowledge engineers, knowledge analysts) with SQL? Would you insist that “Pythonists” be taught SQL? Or, vice-versa?

    Or, would you like a storage choice that may play to the strengths of your complete knowledge workforce? I’ve excellent news for you – one thing like this has already existed since 2013, and it’s known as Apache Parquet!

    Parquet file format in a nutshell

    Earlier than I present you the ins and outs of the Parquet file format, there are (no less than) 5 most important explanation why Parquet is taken into account a de facto commonplace for storing knowledge these days:

    • Information compression – by making use of varied encoding and compression algorithms, Parquet file supplies lowered reminiscence consumption
    • Columnar storage – that is of paramount significance in analytic workloads, the place quick knowledge learn operation is the important thing requirement. However, extra on that later within the article…
    • Language agnostic – as already talked about beforehand, builders might use totally different programming languages to govern the information within the Parquet file
    • Open-source format – that means, you aren’t locked with a particular vendor
    • Assist for advanced knowledge varieties

    Row-store vs Column-store

    We’ve already talked about that Parquet is a column-based storage format. Nevertheless, to know the advantages of utilizing the Parquet file format, we first want to attract the road between the row-based and column-based methods of storing the information.

    In conventional, row-based storage, the information is saved as a sequence of rows. One thing like this:

    Picture by creator

    Now, once we are speaking about OLAP eventualities, a few of the widespread questions that your customers might ask are:

    • What number of balls did we promote?
    • What number of customers from the USA purchased a T-shirt?
    • What’s the whole quantity spent by buyer Maria Adams?
    • What number of gross sales did we now have on January 2nd?

    To have the ability to reply any of those questions, the engine should scan each row from the start to the very finish! So, to reply the query: what number of customers from the USA purchased T-shirt, the engine has to do one thing like this:

    Picture by creator

    Basically, we simply want the knowledge from two columns: Product (T-Shirts) and Nation (USA), however the engine will scan all 5 columns! This isn’t probably the most environment friendly answer – I believe we are able to agree on that…

    Column retailer

    Let’s now study how the column retailer works. As chances are you’ll assume, the strategy is 180 levels totally different:

    Picture by creator

    On this case, every column is a separate entity – that means, every column is bodily separated from different columns! Going again to our earlier enterprise query: the engine can now scan solely these columns which might be wanted by the question (Product and nation), whereas skipping scanning the pointless columns. And, most often, this could enhance the efficiency of the analytical queries.

    Okay, that’s good, however the column retailer existed earlier than Parquet and it nonetheless exists outdoors of Parquet as nicely. So, what’s so particular in regards to the Parquet format?

    Parquet is a columnar format that shops the information in row teams

    Wait, what?! Wasn’t it difficult sufficient even earlier than this? Don’t fear, it’s a lot simpler than it sounds 🙂

    Let’s return to our earlier instance and depict how Parquet will retailer this identical chunk of knowledge:

    Picture by creator

    Let’s cease for a second and clarify the illustration above, as that is precisely the construction of the Parquet file (some further issues had been deliberately omitted, however we’ll come quickly to clarify that as nicely). Columns are nonetheless saved as separate items, however Parquet introduces further buildings, known as Row group.

    Why is this extra construction tremendous necessary?

    You’ll want to attend for a solution for a bit :). In OLAP eventualities, we’re primarily involved with two ideas: projection and predicate(s). Projection refers to a SELECT assertion in SQL language – which columns are wanted by the question. Again to our earlier instance, we want solely the Product and Nation columns, so the engine can skip scanning the remaining ones.

    Predicate(s) consult with the WHERE clause in SQL language – which rows fulfill standards outlined within the question. In our case, we’re curious about T-Shirts solely, so the engine can utterly skip scanning Row group 2, the place all of the values within the Product column equal socks!

    Picture by creator

    Let’s shortly cease right here, as I would like you to comprehend the distinction between varied forms of storage when it comes to the work that must be carried out by the engine:

    • Row retailer – the engine must scan all 5 columns and all 6 rows
    • Column retailer – the engine must scan 2 columns and all 6 rows
    • Column retailer with row teams – the engine must scan 2 columns and 4 rows

    Clearly, that is an oversimplified instance, with solely 6 rows and 5 columns, the place you’ll positively not see any distinction in efficiency between these three storage choices. Nevertheless, in actual life, once you’re coping with a lot bigger quantities of knowledge, the distinction turns into extra evident.

    Now, the truthful query can be: how does Parquet “know” which row group to skip/scan?

    Parquet file comprises metadata

    Which means that each Parquet file comprises “knowledge about knowledge” – data resembling minimal and most values in a particular column inside a sure row group. Moreover, each Parquet file comprises a footer, which retains the details about the format model, schema data, column metadata, and so forth. You will discover extra particulars about Parquet metadata varieties here.

    Vital: In an effort to optimize the efficiency and eradicate pointless knowledge buildings (row teams and columns), the engine first must “get acquainted” with the information, so it first reads the metadata. It’s not a sluggish operation, but it surely nonetheless requires a sure period of time. Due to this fact, should you’re querying the information from a number of small Parquet information, question efficiency can degrade, as a result of the engine should learn metadata from every file. So, you have to be higher off merging a number of smaller information into one larger file (however nonetheless not too huge :)…

    I hear you, I hear you: Nikola, what’s “small” and what’s “huge”? Sadly, there isn’t a single “golden” quantity right here, however for instance, Microsoft Azure Synapse Analytics recommends that the individual Parquet file should be at least a few hundred MBs in size.

    What else is in there?

    Here’s a simplified, high-level illustration of the Parquet file format:

    Picture by creator

    Can or not it’s higher than this? Sure, with knowledge compression

    Okay, we’ve defined how skipping the scan of the pointless knowledge buildings (row teams and columns) might profit your queries and improve the general efficiency. However, it’s not solely about that – keep in mind after I informed you on the very starting that one of many most important benefits of the Parquet format is the lowered reminiscence footprint of the file? That is achieved by making use of varied compression algorithms.

    I’ve already written about varied knowledge compression varieties in Energy BI (and the Tabular mannequin on the whole) here, so possibly it’s a good suggestion to begin by studying this text.

    There are two most important encoding varieties that allow Parquet to compress the information and obtain astonishing financial savings in house:

    • Dictionary encoding – Parquet creates a dictionary of the distinct values within the column, and afterward replaces “actual” values with index values from the dictionary. Going again to our instance, this course of appears to be like one thing like this:
    Picture by creator

    You would possibly assume: why this overhead, when product names are fairly brief, proper? Okay, however now think about that you simply retailer the detailed description of the product, resembling: “Lengthy arm T-Shirt with utility on the neck”. And, now think about that you’ve got this product offered million instances…Yeah, as a substitute of getting million instances repeating worth “Lengthy arm…bla bla”, the Parquet will retailer solely the Index worth (integer as a substitute of textual content).

    Can or not it’s higher than THIS?! Sure, with the Delta Lake file format

    Okay, what the heck is now a Delta Lake format?! That is the article about Parquet, proper?

    So, to place it in plain English: Delta Lake is nothing else however the Parquet format “on steroids”. Once I say “steroids”, the primary one is the versioning of Parquet information. It additionally shops a transaction log to allow monitoring all modifications utilized to the Parquet file. That is also called ACID-compliant transactions.

    Because it helps not solely ACID transactions, but additionally helps time journey (rollbacks, audit trails, and many others.) and DML (Information Manipulation Language) statements, resembling INSERT, UPDATE and DELETE, you received’t be mistaken should you consider the Delta Lake as a “knowledge warehouse on the information lake” (who stated: Lakehouse😉😉😉). Inspecting the professionals and cons of the Lakehouse idea is out of the scope of this text, however should you’re curious to go deeper into this, I recommend you learn this article from Databricks.

    Conclusion

    We evolve! Similar as we, the information can be evolving. So, new flavors of knowledge required new methods of storing it. The Parquet file format is likely one of the most effective storage choices within the present knowledge panorama, because it supplies a number of advantages – each when it comes to reminiscence consumption, by leveraging varied compression algorithms, and quick question processing by enabling the engine to skip scanning pointless knowledge.

    Thanks for studying!



    Source link

    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email
    Previous ArticlePX4: Toward a Symbolic-Operational Intelligence System That Evolves with It’s Creator | by Igor Figueiredo | May, 2025
    Next Article Barbara Corcoran Finds a Buyer in One Day for $12M Penthouse
    Team_AIBS News
    • Website

    Related Posts

    Artificial Intelligence

    STOP Building Useless ML Projects – What Actually Works

    July 1, 2025
    Artificial Intelligence

    Implementing IBCS rules in Power BI

    July 1, 2025
    Artificial Intelligence

    Become a Better Data Scientist with These Prompt Engineering Tips and Tricks

    July 1, 2025
    Add A Comment
    Leave A Reply Cancel Reply

    Top Posts

    STOP Building Useless ML Projects – What Actually Works

    July 1, 2025

    I Tried Buying a Car Through Amazon: Here Are the Pros, Cons

    December 10, 2024

    Amazon and eBay to pay ‘fair share’ for e-waste recycling

    December 10, 2024

    Artificial Intelligence Concerns & Predictions For 2025

    December 10, 2024

    Barbara Corcoran: Entrepreneurs Must ‘Embrace Change’

    December 10, 2024
    Categories
    • AI Technology
    • Artificial Intelligence
    • Business
    • Data Science
    • Machine Learning
    • Technology
    Most Popular

    How to build Conscious AGI. I argue consciousness may emerge in… | by Logan Hallee | Jan, 2025

    January 1, 2025

    Can we fix AI’s evaluation crisis?

    June 24, 2025

    How Do Auroras Come About? Space Rocket Takes a Closer Look at the Northern Lights. | by Daily Blogs | Dec, 2024

    December 22, 2024
    Our Picks

    STOP Building Useless ML Projects – What Actually Works

    July 1, 2025

    Credit Risk Scoring for BNPL Customers at Bati Bank | by Sumeya sirmula | Jul, 2025

    July 1, 2025

    The New Career Crisis: AI Is Breaking the Entry-Level Path for Gen Z

    July 1, 2025
    Categories
    • AI Technology
    • Artificial Intelligence
    • Business
    • Data Science
    • Machine Learning
    • Technology
    • Privacy Policy
    • Disclaimer
    • Terms and Conditions
    • About us
    • Contact us
    Copyright © 2024 Aibsnews.comAll Rights Reserved.

    Type above and press Enter to search. Press Esc to cancel.