Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Lakehouse commands

Reference for dataos-ctl lakehouse commands.

The lakehouse command group manages Iceberg tables inside a DataOS® Lakehouse: namespaces, tables, branches, schema, partitioning, properties, snapshots, and maintenance operations. A Data Engineer uses these commands to inspect and evolve Lakehouse tables directly from the terminal, without writing SQL DDL.

Quick reference

Command
Description

dataos-ctl lakehouse namespace list

List namespaces in a DataOS® Lakehouse

dataos-ctl lakehouse operation apply

Apply a DataOS® Lakehouse operation

dataos-ctl lakehouse operation delete

Delete a DataOS® Lakehouse operation

dataos-ctl lakehouse operation get

Get a DataOS® Lakehouse operation

dataos-ctl lakehouse table create

Create a table in a DataOS® Lakehouse

dataos-ctl lakehouse table get

Get details of a DataOS® Lakehouse table

dataos-ctl lakehouse table list

List tables in a DataOS® Lakehouse namespace

dataos-ctl lakehouse table branch create

Create a branch on a DataOS® Lakehouse table

dataos-ctl lakehouse table branch delete

Delete a branch from a DataOS® Lakehouse table

dataos-ctl lakehouse table branch fastforward

Fast-forward a target branch to match a source branch

dataos-ctl lakehouse table branch list

List branches of a DataOS® Lakehouse table

dataos-ctl lakehouse table branch rename

Rename a branch on a DataOS® Lakehouse table

dataos-ctl lakehouse table branch replace

Replace a branch on a DataOS® Lakehouse table

dataos-ctl lakehouse table metadata get

Get metadata versions of a DataOS® Lakehouse table

dataos-ctl lakehouse table metadata set

Set the metadata version of a DataOS® Lakehouse table

dataos-ctl lakehouse table partition get

Get partition spec of a DataOS® Lakehouse table

dataos-ctl lakehouse table partition update

Update partition spec of a DataOS® Lakehouse table

dataos-ctl lakehouse table properties add

Add properties to a DataOS® Lakehouse table

dataos-ctl lakehouse table properties get

Get properties of a DataOS® Lakehouse table

dataos-ctl lakehouse table properties remove

Remove properties from a DataOS® Lakehouse table

dataos-ctl lakehouse table schema add-field

Add a field to a DataOS® Lakehouse table schema

dataos-ctl lakehouse table schema drop-field

Drop a field from a DataOS® Lakehouse table schema

dataos-ctl lakehouse table schema get

Get schema of a DataOS® Lakehouse table

dataos-ctl lakehouse table schema rename-field

Rename a field in a DataOS® Lakehouse table schema

dataos-ctl lakehouse table schema set-nullable

Set field nullability in a DataOS® Lakehouse table schema

dataos-ctl lakehouse table schema update-field

Update the type of a field in a DataOS® Lakehouse table schema

dataos-ctl lakehouse table snapshot cherrypick

Cherry-pick a snapshot into a DataOS® Lakehouse table

dataos-ctl lakehouse table snapshot list

List snapshots of a DataOS® Lakehouse table

dataos-ctl lakehouse table snapshot rollback

Rollback a DataOS® Lakehouse table to a snapshot

dataos-ctl lakehouse table snapshot set

Set the current snapshot of a DataOS® Lakehouse table

lakehouse accepts the aliases lh, lakehouses, and lake-house.

Identifying a lakehouse and a table

Every command in this group needs -n/--name, the name of the Lakehouse Resource (for example sales-lakehouse), not the Depot that backs it. Passing a Depot name here returns lakehouse '<name>' does not exist.

Commands that operate on a specific table accept the target either as one identifier, or as three discrete flags:

Flag
Description

-i, --identifier

A single string: lakehouse:namespace:table or lakehouse|namespace|table.

-n, --name + --namespace + --table

The Lakehouse Resource name, the Iceberg namespace, and the table name as separate flags.

dataos-ctl lakehouse namespace list

List the Iceberg namespaces available in a Lakehouse.

Syntax

Flags

Flag
Description
Type
Required

-n, --name

Name of the Lakehouse Resource.

string

Yes

-h, --help

Display help for this command.

boolean

No

namespace accepts the aliases ns and namespaces.

Lakehouse maintenance operations

The operation subcommand group submits and tracks maintenance jobs against a Lakehouse, such as compaction and snapshot expiry.

operation accepts the aliases op and operations.

dataos-ctl lakehouse operation apply

Submit a maintenance operation from a manifest file.

Flag
Description
Type
Required

-n, --name

Name of the Lakehouse Resource.

string

Yes

-f, --manifestFile

Manifest file describing the operation.

string

Yes

-h, --help

Display help for this command.

boolean

No

The manifest's operation type determines the action: COMPACT, COMPACT_DELETE_FILES, EXPIRE_SNAPSHOTS, REWRITE_MANIFESTS, DROP_TABLE, REMOVE_ORPHAN_FILES, or DELETE_FROM_DATASET.

dataos-ctl lakehouse operation get

Get maintenance operations, with optional filters and pagination.

Flag
Description
Type
Required

-n, --name

Name of the Lakehouse Resource.

string

Yes

--id

ID of a specific operation.

string

No

--namespace

Filter by namespace.

string

No

--table

Filter by table.

string

No

--status

Filter by status: QUEUED, RUNNING, COMPLETED, FAILED.

string

No

--operation

Filter by operation type.

string

No

-a, --all

Get operations from every user, not just the caller.

boolean

No

--page

Page number.

int

No, default 1

--size

Page size.

int

No, default 10

-h, --help

Display help for this command.

boolean

No

dataos-ctl lakehouse operation delete

Delete a maintenance operation record.

Flag
Description
Type
Required

-n, --name

Name of the Lakehouse Resource.

string

Yes

--id

ID of the operation to delete.

string

Yes

-h, --help

Display help for this command.

boolean

No

Table commands

dataos-ctl lakehouse table list

List tables in a namespace.

Flag
Description
Type
Required

-n, --name

Name of the Lakehouse Resource.

string

Yes

--namespace

Iceberg namespace to list tables from.

string

Yes

-h, --help

Display help for this command.

boolean

No

table accepts the aliases tb and tables. table list operates at namespace scope, so it has no --identifier alternative.

dataos-ctl lakehouse table create

Create a table from a manifest file describing its schema.

Flag
Description
Type
Required

-i, --identifier / -n+--namespace+--table

string

Yes

-f, --manifestFile

Manifest file with the table schema.

string

Yes

-h, --help

Display help for this command.

boolean

No

dataos-ctl lakehouse table get

Get a table's details.

Flag
Description
Type
Required

-i, --identifier / -n+--namespace+--table

Target table.

string

Yes

-d, --details

Include detailed output.

boolean

No

-h, --help

Display help for this command.

boolean

No

Table branch commands

Iceberg branches let you write to a table in isolation before merging changes into the main history.

dataos-ctl lakehouse table branch list

Flag
Description
Type
Required

-i, --identifier / -n+--namespace+--table

Target table.

string

Yes

-h, --help

Display help for this command.

boolean

No

dataos-ctl lakehouse table branch create

Flag
Description
Type
Required

-i, --identifier / -n+--namespace+--table

Target table.

string

Yes

--branch

Name of the branch to create.

string

Yes

--sid

Snapshot ID to branch from. Defaults to the latest snapshot.

string

No

-h, --help

Display help for this command.

boolean

No

dataos-ctl lakehouse table branch rename

Flag
Description
Type
Required

-i, --identifier / -n+--namespace+--table

Target table.

string

Yes

--branch

Current branch name.

string

Yes

--new-name

New branch name.

string

Yes

-h, --help

Display help for this command.

boolean

No

dataos-ctl lakehouse table branch fastforward

Fast-forward a target branch to match a source branch that is ahead of it.

Flag
Description
Type
Required

-i, --identifier / -n+--namespace+--table

Target table.

string

Yes

--source

Branch that is ahead, which provides the changes.

string

Yes

--target

Branch that is behind, which receives the changes.

string

Yes

-h, --help

Display help for this command.

boolean

No

dataos-ctl lakehouse table branch replace

Replace a branch with another branch or a specific snapshot.

Flag
Description
Type
Required

-i, --identifier / -n+--namespace+--table

Target table.

string

Yes

--branch

Branch to replace.

string

Yes

--source

Source branch to replace with.

string

One of --source, --sid

--sid

Snapshot ID to replace with.

string

One of --source, --sid

-h, --help

Display help for this command.

boolean

No

dataos-ctl lakehouse table branch delete

Flag
Description
Type
Required

-i, --identifier / -n+--namespace+--table

Target table.

string

Yes

--branch

Branch to delete.

string

Yes

-h, --help

Display help for this command.

boolean

No

Table metadata commands

Metadata versions track Iceberg's metadata.json pointer history, a lower-level rollback mechanism than snapshots.

dataos-ctl lakehouse table metadata get

Flag
Description
Type
Required

-i, --identifier / -n+--namespace+--table

Target table.

string

Yes

-h, --help

Display help for this command.

boolean

No

dataos-ctl lakehouse table metadata set

Flag
Description
Type
Required

-i, --identifier / -n+--namespace+--table

Target table.

string

Yes

--version

Metadata version to set, as shown by metadata get.

string

Yes

-h, --help

Display help for this command.

boolean

No

Table partition commands

dataos-ctl lakehouse table partition get

Flag
Description
Type
Required

-i, --identifier / -n+--namespace+--table

Target table.

string

Yes

-h, --help

Display help for this command.

boolean

No

dataos-ctl lakehouse table partition update

Flag
Description
Type
Required

-i, --identifier / -n+--namespace+--table

Target table.

string

Yes

-f, --manifestFile

Manifest file with the new partition spec.

string

Yes

-h, --help

Display help for this command.

boolean

No

Updating a partition spec evolves it going forward. Existing data files keep their original partition layout; Iceberg does not rewrite historical data.

Table properties commands

Table properties are arbitrary key-value configuration, such as write.format.default.

dataos-ctl lakehouse table properties get

Flag
Description
Type
Required

-i, --identifier / -n+--namespace+--table

Target table.

string

Yes

-h, --help

Display help for this command.

boolean

No

dataos-ctl lakehouse table properties add

Flag
Description
Type
Required

-i, --identifier / -n+--namespace+--table

Target table.

string

Yes

--kv

A key=value pair to add. Repeat the flag for multiple pairs.

stringArray

Yes

-h, --help

Display help for this command.

boolean

No

dataos-ctl lakehouse table properties remove

Flag
Description
Type
Required

-i, --identifier / -n+--namespace+--table

Target table.

string

Yes

--key

A property key to remove. Repeat the flag for multiple keys.

stringArray

Yes

-h, --help

Display help for this command.

boolean

No

Table schema commands

Schema commands evolve a table's columns one field at a time.

dataos-ctl lakehouse table schema get

Flag
Description
Type
Required

-i, --identifier / -n+--namespace+--table

Target table.

string

Yes

-h, --help

Display help for this command.

boolean

No

dataos-ctl lakehouse table schema add-field

Flag
Description
Type
Required

-i, --identifier / -n+--namespace+--table

Target table.

string

Yes

--field-name

Name of the new field.

string

Yes

--type

Field type: a primitive such as string, int, long, double, or decimal, or map.

string

Yes

-p, --precision

Precision, for decimal fields.

int

No, default 10

-s, --scale

Scale, for decimal fields.

int

No, default 2

-k, --keyType

Key datatype, for map fields.

string

With --type map

-v, --valueType

Value datatype, for map fields.

string

With --type map

-h, --help

Display help for this command.

boolean

No

New fields are added as nullable by default.

dataos-ctl lakehouse table schema update-field

Change the type of an existing field. Iceberg only allows type promotions that preserve compatibility, such as int to long or widening a decimal's precision.

Flag
Description
Type
Required

-i, --identifier / -n+--namespace+--table

Target table.

string

Yes

--field-name

Name of the field to update.

string

Yes

--type

New field type.

string

Yes

-p, --precision

Precision, for decimal fields.

int

No, default 10

-s, --scale

Scale, for decimal fields.

int

No, default 2

-h, --help

Display help for this command.

boolean

No

dataos-ctl lakehouse table schema rename-field

Flag
Description
Type
Required

-i, --identifier / -n+--namespace+--table

Target table.

string

Yes

--field-name

Current field name.

string

Yes

--new-name

New field name.

string

Yes

-h, --help

Display help for this command.

boolean

No

dataos-ctl lakehouse table schema set-nullable

Flag
Description
Type
Required

-i, --identifier / -n+--namespace+--table

Target table.

string

Yes

--field-name

Field to update.

string

Yes

--nullable

Whether the field allows nulls.

boolean

No, default true

-h, --help

Display help for this command.

boolean

No

dataos-ctl lakehouse table schema drop-field

Flag
Description
Type
Required

-i, --identifier / -n+--namespace+--table

Target table.

string

Yes

--field-name

Field to drop.

string

Yes

-h, --help

Display help for this command.

boolean

No

Table snapshot commands

Snapshots are Iceberg's data commits; each write to a table produces one.

dataos-ctl lakehouse table snapshot list

Flag
Description
Type
Required

-i, --identifier / -n+--namespace+--table

Target table.

string

Yes

--branch

Filter snapshots by branch name.

string

No

-h, --help

Display help for this command.

boolean

No

dataos-ctl lakehouse table snapshot set

Set the current snapshot pointer to any snapshot ID, including one outside the current branch's ancestry.

Flag
Description
Type
Required

-i, --identifier / -n+--namespace+--table

Target table.

string

Yes

--sid

Snapshot ID to set as current.

string

Yes

-h, --help

Display help for this command.

boolean

No

dataos-ctl lakehouse table snapshot rollback

Roll a table back to a snapshot that is an ancestor of the current one.

Flag
Description
Type
Required

-i, --identifier / -n+--namespace+--table

Target table.

string

Yes

--sid

Snapshot ID to roll back to.

string

Yes

-h, --help

Display help for this command.

boolean

No

dataos-ctl lakehouse table snapshot cherrypick

Cherry-pick a snapshot's changes into the current branch's lineage, without a full branch merge.

Flag
Description
Type
Required

-i, --identifier / -n+--namespace+--table

Target table.

string

Yes

--sid

Snapshot ID to cherry-pick.

string

Yes

-h, --help

Display help for this command.

boolean

No

Validation rules

  • -n/--name must be a Lakehouse Resource name, not the Depot name that backs it; using the Depot name returns lakehouse '<name>' does not exist.

  • Reading namespaces, operations, or tables requires an explicit read grant on that Lakehouse Resource. A missing grant returns a Forbidden error naming the required permission object, not an empty result.

  • --kv (properties add) and --key (properties remove) are repeatable flags; pass the flag once per entry rather than a comma-separated list.

  • schema set-nullable --nullable=false fails if the table already contains null values in that field.

  • Resource commands: apply and inspect the Lakehouse Resource itself.

  • Depot commands: inspect the lakehouse Depot type schema that backs a Lakehouse Resource.

Last updated

Was this helpful?