Vai al contenuto principale

Catalogo Nessie

Panoramica

Project Nessie è un open source Catalogo dati transazionali that brings Git-like version control to data lakes. It enables you to manage multiple versions of your data using branches, tags, and commits, similar to how Git manages source code.

With Ilum’s integration, you can leverage Nessie’s version control features directly in your Spark environment. This allows you to branch, tag, and merge data changes safely and efficiently.

Unlike traditional Hive or Glue catalogs, which only track the latest state of each table, Nessie records Tutte le modifiche come commit in a timeline. Each commit represents a consistent snapshot of your data lake. Changes are isolated until committed, ensuring incomplete or in-progress updates are never visible to other users or jobs. Once finalized, changes become atomically visible, guaranteeing consistency.

Key Features: Nessie vs. Traditional Catalogs

CaratteristicaTraditional CatalogsCatalogo Nessie
BranchingNoYes (Git-like)
Isolated EnvironmentsManual/ComplexSimple, via branches
Commit History & Time TravelLimited/Per-tableFull catalog history
Transazioni multi-tabellaNoYes (atomic commits)
Collaboration & GovernanceMinimoBuilt-in, audit log

Highlights

  • Branching: Create multiple isolated branches (e.g., principale, Dev, staging) without duplicating data. Branches are lightweight pointers to metadata snapshots.
  • Ambienti isolati: Use the same data lake for dev, staging, and prod by isolating changes in branches. No need for separate catalogs or data copies.
  • Cronologia degli impegni e viaggi nel tempo: Nessie maintains a unified commit log. Inspect, audit, or time-travel to any previous state by commit hash or timestamp.
  • Transazioni multi-tabella atomica: Commit changes across multiple tables as a single atomic operation. All succeed or none do.
  • Collaboration & Governance: Work on separate branches, merge changes, and track who changed what and when. Enables safe experimentation and robust auditability.

Core Concepts

Rami

Un ramo is an independent line of development for your data catalog. Branches start as copies of existing branches and track changes separately. They are lightweight, referencing the same data files but different metadata. The default branch is usually principale.

Tag

Un cartellino is a read-only label pointing to a specific commit. Use tags to mark stable versions or important milestones (e.g., v1.0, Uscita 2025-06). Tags are immutable bookmarks.

Commits

Un commettere is a set of changes recorded as a single atomic unit. Each commit has a unique ID, timestamp, author, and optional message. The commit log provides full catalog versioning.

Utilizzo di Nessie in Ilum

avvertimento

Nessie is not enabled by default in Ilum. To enable it, see the production pagina.

Ilum supporta Progetto Nessie as a catalog for version-controlled data management. When using Ilum notebooks or Spark jobs with Apache Iceberg, Git-like operations (branching, merging, tagging) can be performed directly via SQL.

There are two ways to wire Nessie into a cluster: the chart-managed flow, recommended for Helm deployments, and the manual flow, for self-managed Spark images or clusters configured outside the chart.

nota

Nessie SQL operations (USE BRANCH, CREATE BRANCH, MERGE BRANCH, and the rest of the walkthrough below) are supported on both the Spark 3.5 and Spark 4.x image lines. Use the matching ilum/spark:-nessie image, for example ilum/spark:3.5.8-nessie o ilum/spark:4.1.2-nessie. The Spark 4.x image ships nessie-spark-extensions-4.0_2.13, which is ABI-compatible with the Spark 4.1 line (no native 4.1 build is published yet), mirroring the iceberg-spark-runtime-4.0_2.13 it pairs with.

When Ilum is deployed with the Helm chart, the Nessie catalog is configured declaratively. Enable the metastore and set its type to Nessie Nel ilum-core values (the example uses the umbrella-chart key; in the standalone helm_core chart the same keys live at the top level):

ilum-core:
metastore:
Abilitato: vero
digitare: Nessie
Nessie:
address: http (in inglese)://ilum-Nessie:19120
warehouseDir: s3a://ilum-data/nessie_catalog/
s3Endpoint: http (in inglese)://ilum-objectstorage:9000/
s3PathStyleAccess: vero
Ref: principale
catalogName: nessie_catalog
Nessie:
Abilitato: vero

The Iceberg + Nessie catalog wiring — spark.sql.extensionsLe SparkCatalog provider, catalog-impl (NessieCatalog), and io-impl (S3FileIO) — is generated by ilum-core under the configured catalogName; it does not need to be set in values. Ilum injects it, together with the connection settings above (URI, Ref, warehouse, S3 endpoint, path-style, and region) and the catalog's S3 credentials (taken from the cluster's object-storage credentials, never persisted on the metastore), into every Spark submission on a cluster that has the metastore attached. No catalog wiring, extraJavaOptions, or credentials need to be set on the cluster or in the notebook session — a chart-managed Nessie catalog works out of the box.

Con metastore.enabled: true, the bundled default cluster is attached to this metastore automatically, so jobs on it resolve the catalog out of the box. The catalog is addressed by metastore.nessie.catalogName (default nessie_catalog); tables are referenced as nessie_catalog..

throughout the SQL examples below.

To attach the metastore to another cluster, open its Edit Cluster tab and select Nessie in the General metastore dropdown:

Catalog Selection

Manual configuration

For a cluster running a self-managed Spark image, or when Nessie is configured outside the chart, the nessie_catalog must be pre-configured in the Spark session.

Make sure the Spark image used in the cluster has the Nessie client installed. In particular, the following are required:

  • Iceberg Spark Runtime (org.apache.iceberg:iceberg-spark-runtime-_) - Required for Nessie support.
  • Iceberg AWS Bundle (org.apache.iceberg:iceberg-aws-bundle) - Required for S3 support.
  • Nessie SQL Extensions (org.projectnessie.nessie-integrations:nessie-spark-extensions-_) - Required for Nessie-specific SQL operations.

Di Ilum custom Spark image for Nessie: ilum/spark:-nessie includes all the required dependencies.

nota

When the catalog Uri targets the Nessie server's /api/v2 endpoint, also set spark.sql.catalog..client-api-version=2. The Iceberg-bundled Nessie client otherwise defaults to API v1 and the first catalog call fails with NessieApiCompatibilityException: API version mismatch.

avvertimento

Ilum’s spark-nessie image does not include any Delta table dependencies, so the default cluster configuration for Delta tables must be removed when using this image (on a chart deployment, override these via kubernetes.defaultCluster.config). In particular:

NomeValore
spark.sql.catalogo.scintilla_catalogoorg.apache.spark.sql.delta.catalog.DeltaCatalog
spark.sql.extensionsio.delta.sql.DeltaSparkSessionExtension

Nessie Walkthrough

In the beginning, it is recommended to create anything inside the main branch so that you avoid problems with merging into an empty branch:

CREARE TAVOLO nessie_catalog.Gli utenti(
user_id INT,
user_name VARCHAR(20)
);

Create a Branch

CREARE BRANCH dev IN nessie_catalog DA principale;

And to verify everything, list all branches and tags:

LISTA REFERENZE IN nessie_catalog;

Work on a Branch

Create a table and insert data in the Dev branch with the fully qualified name (@ o @):

CREARE TAVOLO nessie_catalog.`sales@dev`(
sale_timestamp CHAR(10),
sale_amount INT,
payment_method VARCHAR(20)
);

INSERIRE IN nessie_catalog.`sales@dev` VALORI
('2025-06-01', 1000, 'In linea'),
('2025-06-02', 1500, 'InStore'),
('2025-06-03', 800, 'In linea'),
('2025-06-04', 1200, 'Mobile'),
('2025-06-05', 950, 'InStore');
SELEZIONARE CONTARE(*) DA nessie_catalog.`sales@dev`;

Or use the USARE statement to switch a context to a specific branch:

USARE BRANCH dev IN nessie_catalog;
SELEZIONARE CONTARE(*) DA nessie_catalog.vendite;
nota

Because Ilum’s SQL executor treats each query as a stateless entity, using the USARE statement requires executing all related statements together.
To do this, select the entire query block in the editor and then press eseguire.

And show the log of all commits done:

MOSTRARE LOG SU Dev IN nessie_catalog;

Merge Branches

FONDERSI BRANCH dev IN principale IN nessie_catalog;
MOSTRARE TABELLE IN nessie_catalog;
nota

If you see an error of No common ancestor in parents of and , this can mean that the branch you are trying to merge into is empty. This will cause the merge to fail, even if the branch you are trying to merge was correctly created from the parent branch.

Cataloging Nessie Tables in OpenMetadata

Iceberg tables managed in Nessie can be surfaced in OpenMetadata — Ilum's metadata catalog and governance layer — so that branched, committed, version-controlled tables become discoverable, classifiable, and lineage-connected assets alongside the rest of the data platform.

OpenMetadata reads Nessie through its Iceberg-REST endpoint (base URI http://ilum-nessie:19120/iceberg), cataloging the tables visible on a single reference. The reference is selected by the warehouse (default nessie_catalog → ref principale), not by the URI path. Nessie's branch/tag/commit history is flattened — OpenMetadata sees only the current state of that one reference, not the version timeline. The integration is opt-in and enabled with two values:

Nessie:
Abilitato: vero
openmetadataBootstrap:
servizi:
iceberg:
Abilitato: vero

For the connector details, branch-semantics caveats, object-storage credential note, and full enabling reference, see Iceberg tables via Project Nessie on the OpenMetadata page.

nota

This integration is newly added and opt-in. Its configuration is validated against the chart; the end-to-end result (a Nessie-committed Iceberg table appearing in the OpenMetadata catalog) is pending live verification. Treat it as a preview until confirmed.

Migliori pratiche

  • Develop in Isolation: Use branches for development or experiments. Promote changes through a hierarchy (e.g., dev → staging → main).
  • Merge Frequently: Merge changes regularly to minimize conflicts.
  • Mantieni i rami di breve durata: Remove feature branches after merging.
  • Avoid Conflicts: Sync your branch with the latest target branch before merging.
  • Tag Milestones: Use tags for stable releases or important checkpoints.
  • Document Changes: Add commit messages for traceability.

Ulteriori informazioni

For advanced SQL operations and the full Nessie Spark SQL reference, see:
👉 Informazioni di riferimento su Nessie Spark SQL

Nessie with Ilum combines Spark’s power with Git-like data management, enabling robust “data as code” workflows for your lakehouse.