For AI agents: the complete documentation index is available at https://docs.ovhcloud.com/es/llms.txt, the full documentation bundle is available at https://docs.ovhcloud.com/es/llms-full.txt, and this page is available as Markdown at https://docs.ovhcloud.com/es/guides/public-cloud/data-analytics/lakehouse/lakehouse-iceberg-v3.md.
Ir al contenido

Lakehouse - Using Iceberg format version 3

Ver como Markdown

Find out what Lakehouse supports with Iceberg v3 (Experimental) - table creation, v2 upgrade, deletion vectors, file loads, per-engine risks and limits

Warning

Lakehouse is in alpha. It is only available to the accounts invited to the alpha programme, and its features, interface and API may change.

Objective

This guide describes what Lakehouse supports with Apache Iceberg format version 3, how to use it, and the risks to know before you adopt it.

Warning

Iceberg format version 3 is Experimental on Lakehouse. You use it at your own risk: it is outside the service level objectives (SLOs), defects are fixed on a best-effort basis, and its behaviour may change.

A version 3 table cannot go back to version 2.

Version 2 remains the default format. You choose version 3 table by table, when you create a table or when you upgrade an existing table from version 2 to version 3.

Requirements

  • A Lakehouse, a schema and a user with a credential. See Lakehouse - Getting started.
  • To create a table: a role that allows creating tables in the schema.
  • To upgrade a table to version 3: a role that allows changing the structure of the table (ALTER privilege).
  • If you read or write your tables with your own engines: the list of these engines and their versions. The "Engines" section says what each of them can read and write.

Instructions

What version 3 brings

In version 2, deleting or updating a few rows can make the engine rewrite whole data files. In version 3, the engine writes a deletion vector: a small file, next to the data file, that lists the deleted rows. Deletes and updates are faster, and the data file is not rewritten.

Version 3 also brings the variant type, to store semi-structured data, and default values on columns.

What the platform supports

CapabilityHowGood to know
Create a version 3 tableData console, SQLVersion 2 remains the default choice.
variant typeData console (at creation), SQLVersion 3 only. Readable by some engines only.
Default value of a columnSQLShown in the data console, read-only.
Deletes and updates with deletion vectorsSQL, on any version 3 tableShown in the Storage tab of the table, on the Deletion vectors row.
Load a file into a version 3 tableData consoleA load that creates a table creates it in version 2.
Upgrade a table from version 2 to version 3Data console, SQLFinal. Requires the ALTER privilege.
Version 4RefusedThe catalog refuses to create a version 4 table or to upgrade a table to version 4 (error 400).

The nanosecond timestamps and the geometry and geography types of version 3 are available in SQL, but each of them is unreadable by at least one engine of the engines table.

Creating a version 3 table

Data console
SQL
Your own engine

In the data console, open the schema and click the button that creates a table. Under Iceberg format, choose Version 3, marked Experimental. The variant type then appears in the list of column types.

Once created, the table shows its version and the Experimental badge on its page.

Upgrading a table from version 2 to version 3

Warning

This upgrade is final. Afterwards, every engine that reads the table must support version 3: an engine that does not support it can no longer read this table. Check each of your engines before you start.

The data is not rewritten: only the metadata of the table changes, and the upgrade is immediate. Subsequent deletes write deletion vectors.

Data console
SQL

On the page of the table, click Upgrade to v3…. The dialog reminds you that the operation is final. Enter the name of the table to confirm, then click Upgrade to v3.

If your rights do not allow it, the console says so: the upgrade requires the ALTER privilege on the table. If a file load is in progress on the table, wait until it ends.

Deleting and updating rows

On a version 3 table, a DELETE or an UPDATE run by the SQL engine of the Lakehouse writes a deletion vector instead of rewriting the data file.

DELETE FROM <schema>.<table> WHERE id < 100;

The Storage tab of the table shows these files on the Deletion vectors row, with the number of rows marked as deleted. The bucket figures date from the last storage analysis: run a new one to update them.

Loading a file into a version 3 table

The file load of the data console works on a version 3 table as it does on a version 2 table.

  • With Replace the data, the rows of the file replace those of the table, and the earlier deletion vectors are no longer referenced.
  • With Recreate the table, the table is recreated in its format version: a version 3 table stays in version 3.
  • With Create the table, the new table is created in version 2. To load into a version 3 table, first create the table in version 3, then load the file into it.

Risks and limits

What Experimental means

  • Format version 3 is outside the service level objectives of the product.
  • Defects are fixed on a best-effort basis, with no guaranteed timeframe.
  • The behaviour can change from one version of the platform to the next.
  • Trino, the SQL engine of the Lakehouse, documents its own support for version 3 as experimental.

An upgrade with no way back

A version 3 table does not go back to version 2: the catalog refuses the request. To go back, create a version 2 table and copy the data into it.

Version 4 is refused

The catalog refuses to create a version 4 table and to upgrade a table to version 4, whichever engine asks for it.

Engines

A Lakehouse accepts any engine compatible with Iceberg REST: the same table can be written by one engine and read by another. The compatibility with your own engines is documented here, not guaranteed. The versions listed are the ones that were tested.

EngineVersion 3 tableDeletion vectorsLimits found
SQL engine of the LakehouseRead, writeRead, writeNone for the capabilities covered by this guide
Spark 4.0 and 3.5, with Iceberg 1.10Read, writeRead. Write only if the table is in merge-on-read mode.A table that holds a nanosecond timestamp, a geometry or a geography does not open. Spark 3.5 does not open a table that holds a variant column. Default values are read, not written.
DuckDB 1.5Read, writeRead, writeA variant column written by DuckDB is not readable by the SQL engine of the Lakehouse. A table that holds a nanosecond timestamp with time zone cannot be read.
PyIceberg 0.12ReadReadNo write to a version 3 table. A table that holds a variant column does not load.
iceberg-go 0.7Read, writeRead, writeA geometry column written by iceberg-go is not readable by DuckDB.

With Spark, a DELETE, an UPDATE or a MERGE writes a deletion vector only if the table sets the matching property, write.delete.mode, write.update.mode or write.merge.mode, to merge-on-read. Otherwise Spark rewrites the data file. Version 3 tables were tested with Iceberg 1.10: use this version or a later one.

Before upgrading a table to version 3

  1. List every engine and tool that reads or writes the table, with its version.
  2. Check each of them in the table above, taking the column types of the table into account.
  3. Try on a copy of the table first: create it in version 3, write to it with each engine that writes the table, then read it with each of your engines.
  4. Upgrade the table to version 3 only once these writes and reads succeed.

Go further

Lakehouse - Key concepts

Lakehouse - Connecting your own tools

Lakehouse - Quotas and limits

Apache Iceberg specification

Join our community of users.

¿Le ha resultado útil esta página?