org_catalog, are V3 tables. Tables created before September 15, 2026 were created at format-version 2 (V2), and Wherobots doesn’t raise them to V3. To check a table, run SHOW TBLPROPERTIES <table> ('format-version'). Geometry and geography columns declared with a CRS, such as GEOMETRY(4326), use the V3 geometry and geography types. Wherobots adds a raster column type and the CREATE SPATIAL INDEX statement, which rewrites a table’s data files clustered by a spatial column.
On V3 tables, merge-on-read DELETE, UPDATE, and MERGE write deletion vectors, the row lineage columns _row_id and _last_updated_sequence_number can be queried, and variant columns can be written and read. Column default values can’t be set, and a table with a timestamp_ns column can’t be read.
A raster column can hold in-db or out-db rasters, and you can use the raster functions in WherobotsDB to manipulate them. This document describes how to use the raster data type and raster functions in tables.
Raster as a primitive type
Wherobots adds araster column type to Apache Iceberg tables. For instance, user can create a table with a raster column using SQL:
- Python
- Scala
- Java
rast. We can inspect the table schema using DESCRIBE command:
- Python
- Scala
- Java
.printSchema() function:
- 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.
Creating table with raster column
As mentioned above, user can create a table with a raster column using SQL:- Python
- Scala
- Java
- 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
RS_FromPath, then use RS_AsInDB to convert the out-db raster to in-db raster:
- Python
- Scala
- Java
Out-DB Raster
To construct out-db raster data and write them to a table, user can useRS_FromPath to construct a raster value and insert it into the table:
- Python
- Scala
- Java
Writing a DataFrame to a table
Users can write a DataFrame containing raster data to a table:- Python
- Scala
- Java
ACID Transactions
Raster tables support the table update statements of Apache Iceberg, such asUPDATE, DELETE and MERGE INTO, in both copy-on-write and merge-on-read mode.
The syntax is identical to the open source Apache Iceberg, please refer to Apache Iceberg - Write with SQL for more information.
Querying data
User can load data from a table usingsedona.table(...):
- Python
- Scala
- Java
- Python
- Scala
- Java
- Python
- Scala
- Java
- Python
- Scala
- Java
.format("iceberg"), this will load an isolated table reference that will not automatically refresh tables used by queries.
- Python
- Scala
- Java
Working with raster data
Data in columns withraster type will be loaded as RasterUDT values in WherobotsDB, user can use any RS_ functions provided by WherobotsDB to manipulate the raster data. For example, user can use RS_MapAlgebra to create a new raster by applying a map algebra expression to the raster column:
- Python
- Scala
- Java
- Python
- Scala
- Java
writeTo function on the resulting DataFrame of the query:
- Python
- Scala
- Java

