oh table
Manage tables and background table services.
oh table show
Lists all tables in a database.
| Flag | Required | Description |
|---|---|---|
--lake | Yes | Lake name |
--database | Yes | Database name |
oh table show --lake my-lake --database events
oh table service
The table service subgroup manages background operations on a table. All subcommands require --lake, --database, and --table.
Service types: CLUSTER COMPACT CLEAN METASYNC
Trigger modes: ON_DEMAND AUTOMATIC
oh table service create
| Flag | Required | Description |
|---|---|---|
--lake, --database, --table | Yes | Target table |
--service | Yes | CLUSTER, COMPACT, CLEAN, or METASYNC |
--trigger-mode | Yes | ON_DEMAND or AUTOMATIC |
--options KEY=VALUE | No | WITH clause parameters; repeatable (see Special parameters) |
Special parameters
All WITH clause parameters from the CREATE TABLE_SERVICE API are passed via --options KEY=VALUE.
| Parameter | Service | Description |
|---|---|---|
cluster.field.names | CLUSTER | Comma-separated clustering key fields |
cluster.layout.strategy | CLUSTER | LINEAR, HILBERT, or Z-ORDER |
cluster.frequency | CLUSTER | Run every N commits (automatic mode only) |
cluster.bootstrap | CLUSTER | True or False — cluster the full table on first run |
compaction.max.bytes | COMPACT | Maximum bytes to compact per job |
compaction.frequency | COMPACT | Run every N commits (automatic mode only) |
cleaner.retention.days | CLEAN | Retention period for table data |
cleaner.frequency | CLEAN | Run every N commits (automatic mode only) |
metasync.catalogs | METASYNC | Comma-separated catalog names to sync to |
<catalogName>.iceberg | METASYNC | true — enable Iceberg sync for a Glue catalog |
<catalogName>.iceberg.databaseName | METASYNC | Iceberg database name in Glue |
<catalogName>.iceberg.tableNameSuffix | METASYNC | Suffix appended to the Iceberg table name |
Examples
Clustering:
oh table service create \
--lake my-lake --database events --table clicks \
--service CLUSTER \
--trigger-mode AUTOMATIC \
--options cluster.field.names=event_date,user_id \
--options cluster.layout.strategy=LINEAR \
--options cluster.frequency=3 \
--options cluster.bootstrap=True
Compaction:
oh table service create \
--lake my-lake --database events --table clicks \
--service COMPACT \
--trigger-mode AUTOMATIC \
--options compaction.frequency=5
Cleaning:
oh table service create \
--lake my-lake --database events --table clicks \
--service CLEAN \
--trigger-mode AUTOMATIC \
--options cleaner.retention.days=30 \
--options cleaner.frequency=5
MetaSync to multiple catalogs:
oh table service create \
--lake my-lake --database events --table clicks \
--service METASYNC \
--trigger-mode AUTOMATIC \
--options metasync.catalogs=my-glue-catalog,my-snowflake-catalog
MetaSync with Glue Iceberg integration:
oh table service create \
--lake my-lake --database events --table clicks \
--service METASYNC \
--trigger-mode AUTOMATIC \
--options metasync.catalogs=my-glue-catalog \
--options my-glue-catalog.iceberg=true \
--options my-glue-catalog.iceberg.databaseName=my_iceberg_db \
--options my-glue-catalog.iceberg.tableNameSuffix=_iceberg
oh table service alter
Changes the trigger mode or options of an existing service. Uses the same --options keys as create.
| Flag | Required | Description |
|---|---|---|
--lake, --database, --table, --service | Yes | Target service |
--trigger-mode | Yes | New trigger mode |
--options KEY=VALUE | No | WITH clause parameters; repeatable |
# Update clustering fields
oh table service alter \
--lake my-lake --database events --table clicks \
--service CLUSTER \
--trigger-mode AUTOMATIC \
--options cluster.field.names=event_date,region,user_id \
--options cluster.layout.strategy=Z-ORDER \
--options cluster.frequency=3
# Update MetaSync catalogs
oh table service alter \
--lake my-lake --database events --table clicks \
--service METASYNC \
--trigger-mode AUTOMATIC \
--options metasync.catalogs=my-glue-catalog,my-unity-catalog
oh table service describe
Describes a single table service.
oh table service describe \
--lake my-lake --database events --table clicks \
--service COMPACT
oh table service show
Lists all services configured on a table.
oh table service show --lake my-lake --database events --table clicks
oh table service show-runs
Lists all runs for a specific table service.
oh table service show-runs \
--lake my-lake --database events --table clicks \
--service COMPACT
oh table service run
Triggers an on-demand service run. Supports an extended set of service types: CLUSTER, COMPACT, CLEAN, METASYNC, AUTOSAVEPOINT, RESTORE.
oh table service run \
--lake my-lake --database events --table clicks \
--service COMPACT
oh table service pause
Pauses an automatic table service.
oh table service pause \
--lake my-lake --database events --table clicks \
--service COMPACT
oh table service resume
Resumes a paused table service.
oh table service resume \
--lake my-lake --database events --table clicks \
--service COMPACT
oh table service cancel
Cancels an in-progress table service run.
oh table service cancel \
--lake my-lake --database events --table clicks \
--service COMPACT
oh table service alter-cluster
Changes which services cluster a table uses.
| Flag | Required | Description |
|---|---|---|
--lake, --database, --table | Yes | Target table |
--services-cluster | Yes | New services cluster name |
oh table service alter-cluster \
--lake my-lake --database events --table clicks \
--services-cluster prod-v2