DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Please enter at least three characters to search
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Zones

Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

The software you build is only as secure as the code that powers it. Learn how malicious code creeps into your software supply chain.

Apache Cassandra combines the benefits of major NoSQL databases to support data management needs not covered by traditional RDBMS vendors.

Generative AI has transformed nearly every industry. How can you leverage GenAI to improve your productivity and efficiency?

Modernize your data layer. Learn how to design cloud-native database architectures to meet the evolving demands of AI and GenAI workloads.

Related

  • Starburst Unveils Fully Managed 'Icehouse' for Near Real-Time Analytics on the Open Data Lakehouse
  • Exploring Slowly Changing Dimensions in Data Warehousing
  • Unlocking Data Insights and Architecture: Data Warehouses, Lakes, and Lakehouses
  • Data Warehouses: The Undying Titans of Information Storage

Trending

  • Using Python Libraries in Java
  • The Smart Way to Talk to Your Database: Why Hybrid API + NL2SQL Wins
  • How To Build Resilient Microservices Using Circuit Breakers and Retries: A Developer’s Guide To Surviving
  • Vibe Coding With GitHub Copilot: Optimizing API Performance in Fintech Microservices
  1. DZone
  2. Data Engineering
  3. Big Data
  4. An Introduction To Open Table Formats

An Introduction To Open Table Formats

Path to performant, cost-effective, efficient data lakehouse enabling more intelligent interaction between storage and compute engines.

By 
Kranthi Kiran Erusu user avatar
Kranthi Kiran Erusu
·
Jul. 15, 24 · Tutorial
Likes (6)
Comment
Save
Tweet
Share
4.9K Views

Join the DZone community and get the full member experience.

Join For Free

The evolution of data management architectures from warehouses to lakes and now to lakehouses represents a significant shift in how businesses handle large datasets. The data lakehouse model combines the best of both worlds, offering the cost-effectiveness and flexibility of data lakes with the robust functionality of data warehouses. This is achieved through innovative table formats that provide a metadata layer, enabling more intelligent interaction between storage and compute resources.

How Did We Get to Open Table Formats?

Hive: The Original Table Format

Running analytics on Hadoop data lakes initially required complex Java jobs using the MapReduce framework, which was not user-friendly for many analysts. To address this, Facebook developed Hive in 2009, allowing users to write SQL instead of MapReduce jobs.

Hive converts SQL statements into executable MapReduce jobs. It introduced the Hive table format and Hive Metastore to track tables. A table is defined as all files within a specified directory (or prefixes for object storage), with partitions as subdirectories. The Hive Metastore tracks these directory paths, enabling query engines to locate the relevant data.

Benefits of the Hive Table Format

  • Efficient queries: Techniques like partitioning and bucketing enabled faster queries by avoiding full table scans.
  • File format agnostic: Supported various file formats (e.g., Apache Parquet, Avro, CSV/TSV) without requiring data transformation.
  • Atomic changes: Allowed atomic changes to individual partitions via the Hive Metastore.
  • Standardization: Became the de facto standard, compatible with most data tools.

Limitations of the Hive Table Format

  • Inefficient file-level changes: No mechanism for atomic file swaps, only partition-level updates.
  • Lack of multi-partition transactions: No support for atomic updates across multiple partitions, leading to potential data inconsistencies.
  • Concurrent updates: Limited support for concurrent updates, especially with non-Hive tools.
  • Slow query performance: Time-consuming file and directory listings slowed down queries.
  • Partitioning challenges: Derived partition columns could lead to full table scans if not properly filtered.
  • Inconsistent table statistics: Asynchronous jobs often result in outdated or unavailable table statistics, hindering query optimization.
  • Object storage throttling: Performance issues with large numbers of files in a single partition due to object storage throttling.

As datasets and use cases grew, these limitations highlighted the need for newer table formats.

Modern table formats offer key improvements over the Hive table format:

  • ACID transactions: Ensure transactions are fully completed or canceled, unlike legacy formats.
  • Concurrent writers: Safely handle multiple writers, maintaining data consistency.
  • Enhanced statistics: Provide better table statistics and metadata, enabling more efficient query planning and reduced file scanning.

With that context, this document explores the popular Open Table Format: Apache Iceberg.

What Is Apache Iceberg?

Apache Iceberg is a table format created in 2017 by Netflix to address performance and consistency issues with the Hive table format. It became open source in 2018 and is now supported by many organizations, including Apple, AWS, and LinkedIn. Netflix identified that tracking tables as directories limited consistency and concurrency. They developed Iceberg with goals of:

  • Consistency: Ensuring atomic updates across partitions.
  • Performance: Reducing query planning time by avoiding excessive file listings.
  • Ease of use: Providing intuitive partitioning without requiring knowledge of physical table structure.
  • Evolvability: Allowing safe schema and partitioning updates without rewriting the entire table.
  • Scalability: Supporting petabyte-scale data.

Iceberg defines tables as a canonical list of files, not directories, and includes support libraries for integration with compute engines like Apache Spark and Apache Flink.

Iceberg catalog

Metadata Tree Components in Apache Iceberg

  • Manifest file: Lists data files with their locations and key metadata for efficient execution plans.
  • Manifest list: Defines a table snapshot as a list of manifest files with statistics for efficient execution plans.
  • Metadata file: Defines the table’s structure, including schema, partitioning, and snapshots.
  • Catalog: Tracks the table location, mapping table names to the latest metadata file, similar to the Hive Metastore. Various tools, including the Hive Metastore, can serve as a catalog.

Key Features

ACID Transactions 

Apache Iceberg uses optimistic concurrency control to ensure ACID guarantees, even with multiple readers and writers. This approach assumes transactions won’t conflict and checks for conflicts only when necessary, minimizing locking and improving performance. Transactions either commit fully or fail, with no partial states.

Concurrency guarantees are managed by the catalog, which has built-in ACID guarantees, ensuring atomic transactions and data correctness. Without this, conflicting updates from different systems could lead to data loss. A pessimistic concurrency model, which uses locks to prevent conflicts, may be added in the future.

Partition Evolution

Before Apache Iceberg, changing a table’s partitioning often required rewriting the entire table, which was costly at scale. Alternatively, sticking with the existing partitioning sacrificed performance improvements.

With Apache Iceberg, you can update the table’s partitioning without rewriting the data. Since partitioning is metadata-driven, changes are quick and inexpensive. For example, a table initially partitioned by month can evolve to day partitions, with new data written in day partitions and queries planned accordingly.

example query

Hidden Partitioning

Users often don’t know or need to know how a table is physically partitioned. For example, querying by a timestamp field might seem intuitive, but if the table is partitioned by event_year, event_month, and event_day, it can lead to a full table scan.

Apache Iceberg solves this by allowing partitioning based on a column and an optional transform (e.g., bucket, truncate, year, month, day, hour). This eliminates the need for extra partitioning columns, making queries more intuitive and efficient.

In the figure below, assuming the table uses day partitioning, the query would result in a full table scan in Hive due to a separate “day” column for partitioning. In Iceberg, the metadata tracks the partitioning as “the transformed value of CURRENT_DATE,” allowing the query to use the partitioning when filtering by CURRENT_DATE.

hidden partitioning

Time Travel

Apache Iceberg offers immutable snapshots, enabling queries on the table’s historical state, known as time travel. This is useful for tasks like end-of-quarter reporting or reproducing ML model outputs at a specific point in time, without duplicating data.

Version Rollback

Iceberg’s snapshot isolation allows querying data as it is and reverting the table to any previous snapshot, making it easy to undo mistakes.

Schema Evolution

Iceberg supports robust schema evolution, enabling changes like adding/removing columns, renaming columns, or changing data types (e.g., updating an int column to a long column).

Adoption

One of the best things about Iceberg is its vast adoption by many different engines. In the diagram below, you can see many different technologies can work with the same set of data as long as they use the open-source Iceberg API. As you can see, the popularity and work that each engine has done is a great indicator of the popularity and usefulness that this exciting technology brings.

iceberg

Conclusion

This post covered the evolution of data management towards data lakehouses, the key issues addressed by open table formats, and an introduction to the high-level architecture of Apache Iceberg, a leading open table format.

Data management Data (computing) Data lake Data warehouse

Opinions expressed by DZone contributors are their own.

Related

  • Starburst Unveils Fully Managed 'Icehouse' for Near Real-Time Analytics on the Open Data Lakehouse
  • Exploring Slowly Changing Dimensions in Data Warehousing
  • Unlocking Data Insights and Architecture: Data Warehouses, Lakes, and Lakehouses
  • Data Warehouses: The Undying Titans of Information Storage

Partner Resources

×

Comments
Oops! Something Went Wrong

The likes didn't load as expected. Please refresh the page and try again.

ABOUT US

  • About DZone
  • Support and feedback
  • Community research
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 100
  • Nashville, TN 37211
  • support@dzone.com

Let's be friends:

Likes
There are no likes...yet! 👀
Be the first to like this post!
It looks like you're not logged in.
Sign in to see who liked this post!