---
title: "Export Pixeltable Tables to Apache Iceberg for Lakehouse Analytics"
date: "2026-06-13"
author: "Pixeltable Team"
tags:
  - Iceberg
  - Lakehouse
  - Data Export
  - Analytics
  - PyArrow
  - OLAP
  - Pixeltable
  - Multimodal AI
description: "Process multimodal AI pipelines in Pixeltable, then stream curated results to Apache Iceberg for Spark, DuckDB, Snowflake, and BI tools—with automatic PyArrow batching and schema mapping."
url: "https://www.pixeltable.com/blog/export-iceberg-lakehouse-bridge-pixeltable"
---

# Export Pixeltable Tables to Apache Iceberg for Lakehouse Analytics

Pixeltable 0.6.5 adds `export_iceberg()`: stream a table or query result into an Apache Iceberg table. Process multimodal data in declarative pipelines, then hand curated tabular columns to Spark, DuckDB, Snowflake, or any Iceberg-compatible analytics stack.

 
## Why Iceberg export?

 
Pixeltable is your **AI data infrastructure** layer—storage, computed columns, embeddings, versioning, and lineage for multimodal workflows. Analytics teams often need the same curated outputs in a **lakehouse** format for SQL dashboards, feature stores, or warehouse joins.

 
Pixeltable already supports several export paths:

 

 - [`export_sql()`](/blog/pixeltable-january-2026-release-highlights) — push rows to PostgreSQL, SQLite, Snowflake, and other OLTP databases

 - [`export_lancedb()`](/blog/pixeltable-lancedb-integration) — vector-focused analytics with LanceDB

 - `export_parquet()` / `export_csv()` — file-based handoff

 

 
**Iceberg** fills the gap when you need open table format semantics—ACID commits, schema evolution, time travel, and catalog-backed tables shared across engines. Export after your Pixeltable pipeline produces the columns downstream teams actually want: summaries, labels, scores, structured JSON fields—not raw video blobs.

 
## When to use which export

 
| Export | Best for |
| --- | --- |
| Iceberg | Lakehouse analytics, Spark/DuckDB/Trino, catalog-managed tables |
| SQL | Operational serving DB, app-facing replicas |
| LanceDB | Vector similarity at analytics scale |
| Parquet / CSV | Ad hoc files, one-off shares |

 
## Getting started

 
```bash
pip install -U pixeltable pyiceberg pyarrow
```

 
`export_iceberg()` streams data via PyArrow `RecordBatch`es. Control batch size with `batch_size_bytes` (default 128 MB) for memory-efficient exports of large tables.

 
## Basic export

 
```python
import pixeltable as pxt
from pyiceberg.catalog import load_catalog
from pixeltable.io import export_iceberg

# After running your pipeline...
docs = pxt.get_table('rag.documents')

catalog = load_catalog(
 'local',
 **{
 'type': 'sql',
 'uri': 'sqlite:///warehouse/pyiceberg_catalog.db',
 'warehouse': 'file:///tmp/warehouse',
 },
)

export_iceberg(
 docs.select(docs.title, docs.summary, docs.category),
 catalog,
 'analytics.processed_documents',
 if_exists='replace',
)
```

 
The `table_name` argument is a fully qualified Iceberg identifier (e.g. `'namespace.table'`). If the namespace does not exist, it is created. Use `if_exists='append'` when the destination table already exists and schemas are compatible.

 
## Export a query, not just a table

 
Pass any Pixeltable `Query`—filters, projections, and joins applied before export:

 
```python
high_confidence = (
 docs
 .where(docs.confidence > 0.9)
 .select(docs.title, docs.summary, docs.confidence)
)

export_iceberg(
 high_confidence,
 catalog,
 'analytics.high_confidence_docs',
 if_exists='append',
)
```

 
## Schema overrides

 
By default, Pixeltable maps column types to Arrow types automatically. Pass `schema_overrides` when you need explicit PyArrow types for specific columns:

 
```python
import pyarrow as pa

export_iceberg(
 docs.select(docs.id, docs.score),
 catalog,
 'analytics.scored_docs',
 schema_overrides={'score': pa.float64()},
 if_exists='replace',
)
```

 
## Multimodal pipeline pattern

 
A typical flow:

 

 - Ingest documents, images, or video into Pixeltable tables

 - Run computed columns—transcription, summarization, classification, embedding

 - Export structured columns (text, labels, scores, JSON metadata) to Iceberg

 - Query in DuckDB, Spark, or Snowflake for BI and downstream ML features

 

 
Media files stay in Pixeltable's storage layer (or your configured S3/R2 destination); Iceberg carries the *derived* tabular artifacts your warehouse expects. That split matches how teams already use [cloud blob storage](/blog/s3-files-huggingface-buckets-pixeltable-storage) for raw assets and warehouses for analytics tables.

 
## Documentation note

 
A dedicated Iceberg cookbook is in progress. Until then, refer to the [I/O SDK reference](https://docs.pixeltable.com/sdk/latest/io) for parameter details and the [changelog](https://docs.pixeltable.com/changelog/changelog) for release notes.

 
## Learn more

 

 - [Pixeltable I/O SDK documentation](https://docs.pixeltable.com/sdk/latest/io)

 - [Apache Iceberg](https://iceberg.apache.org/)

 - [Pixeltable + LanceDB export](/blog/pixeltable-lancedb-integration)

 - [May/June 2026 release highlights](/blog/pixeltable-may-june-2026-release-highlights)

 - [Pixeltable vs lakehouse platforms](/blog/pixeltable-databricks-alternative)