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

Command reference

Lakehouse resource management commands

Reference for the commands you use to manage Lakehouses in DataOS.

If you do not have the required permissions, contact your DataOS Operator.

Applying a Lakehouse

Applying the Lakehouse Resource manifest creates a Lakehouse Resource instance in the DataOS environment.

Command

dataos-ctl resource apply -f ${manifest-file-path}

Flags

Flag
Description

-f, --manifestFile

Manifest file location (required)

-l, --lint

Lint the files without applying

-d, --de-ref

De-reference the files without applying

-R, --recursive

Get manifest files recursively from the provided directory

--disable-interpolation

Disable interpolation of $ENV / ${ENV} variables

-r, --re-run

Re-run resource after apply

Example

dataos-ctl resource apply -f ./lakehouse/s3-lakehouse.yaml

Get Lakehouse status

Retrieve the status of Lakehouses to see their current operational state.

Command

Flags

Flag
Description

-t, --type

Type of resource to query (use lakehouse)

-n, --name

Name of a specific Lakehouse to query

-a, --all

Get resources for all owners

-d, --details

Include detailed spec, runtime state, and active properties in the result

-b, --buildResourceDetails

Include build resource details (Kubernetes resources) in the result

-o, --owner

Get resources for a specific owner ID

--tags

Filter resources with specific tags (comma separated)

-r, --refresh

Auto refresh the results

--refreshRate

Refresh rate in seconds (default: 5)

List your Lakehouses:

List all Lakehouses (all owners):

Get a specific Lakehouse by name:


Inspect Lakehouse details

Two flags give detailed inspection for debugging and operational visibility.

Get detailed spec and runtime information (-d):

The -d flag shows:

  • All submitted spec details

  • Runtime state and overall Lakehouse status

  • Build/bid status

  • Active properties: including internal URLs for each service (REST Catalog, Spark Cluster, Sherpa)

Get build-level Kubernetes resource details (-b):

The -b flag shows:

  • Individual Kubernetes resources created during the build (secrets, services, StatefulSets, deployments, ingresses)

  • Status of each Kubernetes resource

  • Useful for debugging failed creations by identifying which component failed


Generate Lakehouse JSON schema

Generate the JSON schema for a Lakehouse resource for a specified version:

Command

Example


Get Lakehouse manifest schema

Obtain the manifest schema for a Lakehouse:

Command

Example


Deleting a Lakehouse

To delete a specific Lakehouse, use any of the following methods:

Delete by identifier string.

Delete using the manifest file.

Delete by resource type and name.

Flags

Flag
Description

-i, --identifier

Identifier of resource (NAME|VERSION|TYPE or TYPE:VERSION:NAME)

-f, --manifestFile

Manifest file location

-t, --type

Type of resource

-n, --name

Name(s) of resource (supports multiple: name1 name2 name3)

--cascade

Cascade delete inbound dependencies

--force

Force delete even if dependencies exist

Example


Lakehouse operations

Lakehouse operations perform maintenance and management tasks on Iceberg tables within a Lakehouse. Submit, track, and manage them through the lakehouse operation CLI command group.

Tip: use built-in help at any time:

Full command tree

Supported operation types

You can perform the following operations on Iceberg tables within a Lakehouse:

Operation
Description

COMPACT

Compact small data files into larger ones for improved read performance

COMPACT_DELETE_FILES

Compact delete files to optimize storage

EXPIRE_SNAPSHOTS

Clean up old snapshots to reclaim storage

REWRITE_MANIFESTS

Rewrite manifest files for optimization

DROP_TABLE

Remove an Iceberg table from the Lakehouse

REMOVE_ORPHAN_FILES

Remove orphan files that are no longer referenced by any snapshot

DELETE_FROM_DATASET

Delete rows from a dataset that match a filter condition

Operation manifest format

Submit operations through a YAML manifest specifying a namespace, table, operation type, and operation-specific options:

On submission, an operation ID is returned. Use it to track status.


Apply an operation

Submit a new Lakehouse operation from a manifest file.

Command

Flags

Flag
Description

-n, --lakehouseName

Name of the Lakehouse resource (required)

-f, --manifestFile

Path to the operation manifest file (required)

Example


Get operation(s)

Retrieve operation details. Get a single operation by ID or list multiple operations with optional filters.

Command

Flags

Flag
Description

-n, --lakehouseName

Lakehouse resource name (required)

--id

ID of a specific Lakehouse operation

--namespace

Filter by namespace

--table

Filter by table

--operation

Filter by operation type (COMPACT, COMPACT_DELETE_FILES, EXPIRE_SNAPSHOTS, REWRITE_MANIFESTS, DROP_TABLE, REMOVE_ORPHAN_FILES, DELETE_FROM_DATASET)

--status

Filter by operation status (QUEUED, RUNNING, COMPLETED, FAILED)

--page

Page number (default: 1)

--size

Page size (default: 10)

List all operations for a Lakehouse:

Get a specific operation by ID:

Filter operations by namespace, table, type, and status:

Paginate results:


Delete an operation

Delete an operation by its ID.

Command

Flags

Flag
Description

-n, --lakehouseName

Lakehouse resource name (required)

--id

ID of the Lakehouse operation to delete (required)

Example


Aliases and shortcuts

Use these shortened equivalents:

Command Group
Aliases

lakehouse

lh, lakehouses, lake-house

operation

op, operations

namespace

ns, namespaces

table

tb, tables

properties

props

Examples using aliases:


Operation manifest examples

Sample manifests for each supported operation type. The examples show a subset of the parameters each operation supports. For complete parameter references and advanced usage, see Procedures - Apache Icebergâ„¢.

Compact

Compact small data files into larger ones for improved read performance.

Options:

Option
Type
Description

delete_file_threshold

integer

Minimum number of delete files to trigger compaction

rewrite_all

boolean

Whether to rewrite all data files

Compact delete files

Compact delete files to optimize storage and query performance.

Options:

Option
Type
Description

delete_file_threshold

integer

Minimum number of delete files to trigger compaction

compression_factor

float

Compression factor for file sizing

shuffle_partitions_per_file

integer

Number of shuffle partitions per file

use_starting_sequence_number

boolean

Use starting sequence number for rewriting

remove_dangling_deletes

boolean

Remove delete files that no longer reference active data files

Expire snapshots

Clean up old snapshots to reclaim storage space.

Options:

Option
Type
Description

older_than

string (ISO 8601)

Expire snapshots older than this timestamp

retain_last

integer

Number of most recent snapshots to retain

max_concurrent_deletes

integer

Maximum number of concurrent file deletes

Rewrite manifests

Rewrite manifest files to optimize read planning and metadata performance.

Options:

Option
Type
Description

use_caching

boolean

Whether to use caching during manifest rewriting

Drop table

Remove an Iceberg table from the Lakehouse.

Options:

Option
Type
Description

purge

boolean

If true, permanently deletes the table data files in addition to metadata

Remove orphan files

Remove orphan files that are no longer referenced by any table snapshot.

Options:

Option
Type
Description

older_than

string (ISO 8601)

Remove orphan files older than this timestamp

Delete from dataset

Delete rows from an Iceberg table that match a filter condition.

Options:

Option
Type
Description

delete_where

string

SQL filter expression used to select rows to delete


Lakehouse table management

Use dataos-ctl lakehouse (alias lh) commands to manage namespaces, tables, schemas, partitions, snapshots, branches, metadata, and properties on Iceberg tables inside a Lakehouse.

Prerequisites: a configured DataOS CLI context, an applied Lakehouse resource, and a namespace to work with.

Identifier format

Table-scoped commands (such as table get, schema *, snapshot *, branch *, metadata *, properties *) accept either:

  • -i (identifier): the full three-part lakehouse:namespace:table format (or lakehouse|namespace|table with pipe delimiters). When -i is set, all split flags (-n, --namespace, --table) are ignored.

  • -n + --namespace + --table: individual flags used when -i is not set.

Commands with narrower scope (namespace list, table list) use only -n and --namespace.


Namespaces

namespace list

List all namespaces in a Lakehouse.

Example:


Tables

table list

List tables in a namespace. Requires -n and --namespace.

Example:

table get

Get details of a specific table. Use -d for full JSON output.

Example:

table create

Create a table from a YAML manifest. Requires -f with the manifest path.

Example:

See Table Create Manifest for the manifest format.


Schema

All schema commands require a table identifier in lakehouse:namespace:table format.

schema get

schema add-field

Add a new field to the table schema.

Flag
Required
Description

--field-name

Yes

Field name

--type

Yes

Field type: string, int, long, float, double, boolean, date, timestamp, decimal, binary, list, map, struct

-p, --precision

No

Precision for decimal type

-s, --scale

No

Scale for decimal type

-k, --keyType

No

Key type (required when type is map)

-v, --valueType

No

Value type (required when type is map)

schema drop-field

schema rename-field

schema update-field

Update the type of an existing field (type promotion only).

schema set-nullable


Partitions

partition get

Get partition spec and statistics for a table.

partition update

Replace the partition spec from a YAML manifest. Requires -f.

Example:

See Partition Update Manifest for the manifest format.


Snapshots

snapshot list

snapshot set

Set the current snapshot to a specific snapshot ID.

snapshot rollback

Roll back the table to a previous snapshot.

snapshot cherrypick

Cherry-pick a specific snapshot.


Branches

branch list

branch create

branch delete

branch rename

branch replace

Replace a branch with another branch or a specific snapshot.

branch fastforward

Fast-forward a target branch to match a source branch.


Metadata

metadata get

List metadata versions for a table.

metadata set

Roll back or forward to a specific metadata version.

Example:


Properties

properties get

properties add

Add or update key-value properties. Use --kv (repeatable).

Example:

properties remove

Remove properties by key. Use --key (repeatable).

Example:


YAML manifest reference

Three commands accept YAML manifests via the -f flag: table create, partition update, and operation apply.

Table create manifest

The root object contains schema (required) and iceberg (optional).

Schema types:

  • mapping: define fields inline with name and type.

  • avro: provide a raw Avro JSON schema string.

Partition spec types: identity, year, month, day, hour, bucket.

Mapping schema:

Avro schema:

Partition update manifest

The root is a YAML array of partition specs. An empty array [] clears all partitions.

Operation apply manifest

Root object with namespace, table, and operation (all required), and options (optional). Supports multi-document YAML (--- separator) to submit multiple operations in one file.

Supported operations:

Operation
Description
Common Options

COMPACT

Compact small data files

delete_file_threshold, rewrite_all

COMPACT_DELETE_FILES

Compact including delete files

delete_file_threshold, compression_factor, shuffle_partitions_per_file

EXPIRE_SNAPSHOTS

Remove old snapshots

older_than (ISO 8601), retain_last, max_concurrent_deletes

REWRITE_MANIFESTS

Optimize manifest files

use_caching

DROP_TABLE

Drop table from catalog

purge, cleanup_store

REMOVE_ORPHAN_FILES

Clean unreferenced files

older_than (ISO 8601)

DELETE_FROM_DATASET

Delete from dataset

delete_where

Last updated

Was this helpful?