Skip to content
Table Format Maintenance & Operations Last updated: May 29, 2026

Iceberg Spark Procedure register_table

A Spark SQL procedure in Apache Iceberg used to register an existing metadata JSON file as a table within the active catalog.

register_table sparkregister metadata json icebergspark sql call register_table

Iceberg Spark Procedure register_table

The Iceberg Spark Procedure register_table is a administrative utility executed via Spark SQL. It allows data engineers to register an existing Iceberg metadata JSON file (located in cloud or object storage) as a managed table in a different catalog. This procedure is commonly used for migrating tables between catalogs, disaster recovery, or cloning table states to test environments.

Syntax and Implementation

The procedure requires the destination table identifier and the absolute storage path pointing to the target .metadata.json file:

/* Register an existing table using its metadata JSON file path */
CALL prod.system.register_table(
    table => 'db.cloned_logs',
    metadata_file => 's3://my-bucket/db/web_logs/metadata/v12.metadata.json'
);

Architectural Benefits

πŸ“š Go Deeper on Apache Iceberg

Alex Merced has authored three hands-on books covering Apache Iceberg, the Agentic Lakehouse, and modern data architecture. Pick up a copy to master the full ecosystem.

← Back to Iceberg Knowledge Base