org_catalog, are format-version 3 (V3), which has geometry and geography column types, and Wherobots adds a raster column type. Tables created before September 15, 2026 were created at format-version 2 (V2), and Wherobots doesn’t raise them to V3. Which column types a table can have, and whether WherobotsDB skips data files for spatial filters, depend on its format version; see the Iceberg Tables Overview.
A raster column holds in-db or out-db rasters, and the RS_ functions in WherobotsDB work on them. This page shows how to create, write, and query tables with raster columns. The examples use the catalog name org_catalog; replace it with the name of the catalog you write to.
Creating a table with a raster column
Choose the format version before you create the table. WherobotsDB skips data files for raster spatial filters only on format-version 1 and 2 tables, and a new table in a Wherobots-managed catalog is format-version 3. A table can’t be lowered from format-version 3 to 2. The two examples below create format-version 2 tables, withTBLPROPERTIES ('format-version'='2') on CREATE TABLE and .tableProperty("format-version", "2") before .create(). Leave the property off if you don’t filter the rasters spatially, or if the table needs a GEOMETRY(<srid>) or GEOGRAPHY(<srid>) column, which requires format-version 3. See Raster columns on the push-down page.
Declare the column with the raster type:
- Python
- Scala
- Java
rast. Inspect the table schema with DESCRIBE TABLE:
- Python
- Scala
- Java
printSchema():
- Python
- Scala
- Java
SHOW CREATE TABLE prints a raster column as rast BINARY on a format-version 3 table. The column still holds rasters, stored the same way as on a format-version 2 table.
To create a table from a DataFrame that holds rasters, call writeTo(...).create():
- Python
- Scala
- Java
Writing data
Storing raster data in a table is similar to PostGIS. There are two options for storing raster data:- in-db raster: raster data completely stored in a table.
- out-db raster: raster data is stored in an external file (such as GeoTIFF file on S3) and the table stores the path to the file and geo-referencing metadata of that raster.
In-DB Raster
To construct in-db raster data and write them to a table, user can useRS_FromGeoTiff to construct a raster value and write the DataFrame using .writeTo(...).append()
- Python
- Scala
- Java
raster data source, which reads them as out-db rasters, then use RS_AsInDB to convert them to in-db rasters. Take the path with RS_BandPath before the conversion, because an in-db raster no longer references its source file:
- Python
- Scala
- Java
Out-DB Raster
To write out-db rasters to a table, load the raster files with theraster data source and write the DataFrame. Each row holds an out-db raster that references the file. The name column holds only the file name, so these examples write the full path from RS_BandPath to data. The EuroSAT sample files aren’t internally tiled, so these examples set retile to false and load each file as one raster. For tiled files such as Cloud Optimized GeoTIFFs, leave tiling on to write one row for each tile:
- Python
- Scala
- Java
Updating, deleting, and merging data
UPDATE, DELETE, and MERGE INTO work on raster tables, in both copy-on-write and merge-on-read mode. The syntax is the same as in Apache Iceberg; see Apache Iceberg - Write with SQL.
Querying data
Load a table into a DataFrame withsedona.table(...):
- Python
- Scala
- Java
- Python
- Scala
- Java
- Python
- Scala
- Java
- Python
- Scala
- Java
.format("iceberg"). This loads an isolated table reference, which doesn’t refresh automatically when the table changes:
- Python
- Scala
- Java
Working with raster data
Araster column is read as RasterUDT values, which every RS_ function in WherobotsDB works on. For example, RS_MapAlgebra creates a new raster by applying a map algebra expression to each raster:
- Python
- Scala
- Java
CREATE TABLE ... AS SELECT:
- Python
- Scala
- Java
writeTo(...).create() on the DataFrame the query returns:
- Python
- Scala
- Java
Related pages
Iceberg Tables Overview
Format versions, spatial file skipping, and format-version 3 features.
Spatial Filter Push-down and Clustering
Partition or cluster a raster table so WherobotsDB skips more data files for raster filters.
Tune Out-DB Raster Reads
When to use in-db or out-db rasters, and how to tune the out-db raster cache.
Apache Iceberg documentation for Spark
Table maintenance, procedures, and the rest of the Iceberg Spark integration.

