Skip to main content

Quick Start Guide

This guide will help you get started with Apache Iceberg quickly. You’ll learn how to add Iceberg to your project, create your first table, and perform basic operations.
The latest version of Iceberg can be found on the releases page. This guide uses examples compatible with Iceberg 1.0+.

Installation

1

Add Dependencies

Add Iceberg to your project using Maven or Gradle.
Module guide:
  • iceberg-core - The core API and implementations (required)
  • iceberg-parquet - For Parquet file format support
  • iceberg-orc - For ORC file format support
  • iceberg-hive-metastore - For Hive Metastore catalog
  • iceberg-data - For direct JVM data access
2

Choose a Catalog

Iceberg uses catalogs to manage tables. Choose the catalog that fits your environment:
  • Hadoop Catalog - File-based catalog for HDFS or S3
  • Hive Metastore - Uses existing Hive Metastore
  • AWS Glue - For AWS environments
  • Nessie - Git-like data catalog
  • REST Catalog - HTTP-based catalog service
3

Create Your First Table

Follow the examples below to create a table.
Spark is the most feature-rich engine for Iceberg and the easiest way to get started.
1

Start Spark Shell with Iceberg

Launch Spark with the Iceberg runtime package:
Or for spark-sql:
Replace 3.5 with your Spark version (e.g., 3.3, 3.4, 3.5).
2

Create a Table

Create your first Iceberg table using SQL:
Or create a partitioned table:
3

Insert Data

Insert data using standard SQL:
Or insert from another table:
4

Query Data

Query your Iceberg table:
Use time travel to query historical data:
View table history:
5

Update and Merge Data

Iceberg supports row-level updates and merges:

Using the Java API

For programmatic access, use the Iceberg Java API.
1

Initialize a Catalog

Choose and initialize a catalog:
2

Define a Schema

Create a schema for your table:
Type IDs must be unique within the schema. Iceberg automatically reassigns IDs when creating tables to ensure uniqueness.
3

Define Partitioning

Create a partition spec:
Partition transforms include: identity, bucket[N], truncate[L], year, month, day, and hour.
4

Create the Table

Create the table using the catalog:
5

Write Data

Append data files to the table:
This is a simplified example. In practice, you would write data using a file writer or compute engine like Spark.
6

Read Data

Scan and read table data:

Common Operations

Schema Evolution

Modify your table schema without rewriting data:

Time Travel

Access historical versions of your table:

Table Maintenance

Keep your tables healthy:

Next Steps

Now that you’ve created your first Iceberg table, explore more advanced features:

Java API Deep Dive

Learn advanced Java API usage

Partitioning

Master hidden partitioning

Schema Evolution

Safely evolve table schemas

Performance

Optimize table performance

Troubleshooting

Make sure you have all required dependencies:
  • iceberg-core for the core API
  • iceberg-parquet or iceberg-orc for file formats
  • iceberg-hive-metastore for Hive catalog
  • Hadoop dependencies for HDFS access
For Spark, use the runtime JAR which includes all dependencies:
Check that:
  1. Hive Metastore is running: netstat -an | grep 9083
  2. The URI is correct: thrift://localhost:9083
  3. Network firewall allows connections
  4. Hive configuration is in the classpath
Verify:
  1. The catalog name is correct
  2. The database/namespace exists
  3. You have permissions to access the table
  4. The table was created successfully
List tables to debug:
For more help, check the Apache Iceberg documentation or join the community Slack.