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

Manage Lakehouse

Provision the Lakehouse and manage its namespaces, schemas, tables, and views.

A Lakehouse delivers managed Apache Iceberg tables on cloud object storage, with a REST catalog, query services, and an auto-created Depot. As Data Admin you provision it and then own its structure and data.

Provision

The Lakehouse is a lakehouse resource, applied through the DataOS CLI. It needs a Compute attached to the Tenant, reachable object storage (S3, ABFSS, or GCS), and a dedicated PostgreSQL database for the Iceberg catalog metastore.

Creating a Lakehouse also means using a Compute, a Secret for the metastore, and a Secret for object storage. Each needs its own Can Use grant if you don't already hold one. Once the Lakehouse exists, resource-level access to it (Can Edit, Can Manage Access, Can Use) is granted and governed separately from the data inside it. See Lakehouse: Access control in the Access control section.

Create two Secrets first, one for the PostgreSQL metastore and one for object storage, then apply the Lakehouse manifest that references them:

dataos-ctl resource apply -f metastore-secret.yaml
dataos-ctl resource apply -f storage-secret.yaml
dataos-ctl resource apply -f lakehouse.yaml

The manifest names the compute, the metastore (PostgreSQL host, database, schema), and the storage backend (bucket, path, endpoint). For the full manifest, per-backend storage blocks (S3, ABFSS, GCS), and tuning, see Lakehouse in the References.

1

Create Secrets

Create two Secrets before the Lakehouse manifest, one for PostgreSQL and one for object storage. Both are required: the Lakehouse manifest references each of them, so create both, not one or the other.

Metastore Secret (PostgreSQL) — required
metastore-secret.yaml
name: lh-metastore-secret
version: v2alpha
type: secret
layer: user
description: PostgreSQL metastore secret for Lakehouse.
secret:
  type: key-value
  data:
    username: "${postgres-username}"
    password: "${postgres-password}"
Storage Secret (S3) — required
storage-secret.yaml
name: lh-storage-secret
version: v2alpha
type: secret
layer: user
description: S3 storage secret for Lakehouse.
secret:
  type: key-value
  data:
    aws_access_key: "${aws-access-key}"
    aws_secret_key: "${aws-secret-key}"
    storage_type: "s3"
    lh_access_token: "${LH_ACCESS_TOKEN}"

Apply both Secrets before you apply the Lakehouse manifest:

dataos-ctl resource apply -f metastore-secret.yaml
dataos-ctl resource apply -f storage-secret.yaml

For the general Secret and Depot pattern, see Add data sources and Secrets.

2

Draft Lakehouse manifest

Replace the placeholders with your environment values. This example uses S3. Use the matching storage block for ABFSS or GCS.

lakehouse.yaml
name: s3pglh
version: v1alpha
type: lakehouse
description: Lakehouse on S3 storage
tags:
  - lakehouse
  - s3
spec:
  compute: "${compute-name}"
  runAsUser: "${user-id}"
  iceberg:
    metastore:
      type: iceberg-jdbc-catalog
      replicas: 1
      secret: "${tenant}:lh-metastore-secret"
      postgresql:
        host: "${postgres-host}"
        port: "5432"
        database: "${database-name}"
        schema: public
      hadoopConf:
        fs.s3a.connection.maximum: 1000
      resources:
        limits:
          cpu: "1"
          memory: 2000Mi
        requests:
          cpu: "1"
          memory: 1000Mi
    storage:
      type: s3
      s3:
        bucket: "${s3-bucket-name}"
        relativePath: "${relative-path}"
        scheme: s3a
        format: ICEBERG
        endpoint: "${s3-endpoint}"
      secret: "${tenant}:lh-storage-secret"
    sherpa:
      replicas: 1
      resources:
        limits:
          cpu: 500m
          memory: 1000Mi
        requests:
          cpu: 200m
          memory: 512Mi
    sparkCluster:
      server:
        requests:
          cpu: 200m
          memory: 512Mi
        limits:
          cpu: 500m
          memory: 1000Mi
      driver:
        coreLimit: "2048m"
        cores: 1
        memory: "2048m"
      executor:
        coreLimit: "2048m"
        cores: 1
        memory: "2048m"
        instances: 1
  logLevel: INFO

For the full attribute reference and per-backend storage blocks (S3, ABFSS, GCS), see Lakehouse in the References.

3

Apply and verify

dataos-ctl resource apply -f lakehouse.yaml
dataos-ctl resource get -t lakehouse
dataos-ctl resource get -t lakehouse -n s3pglh -d

DataOS creates an auto-named Depot (<lakehouse-name>-depot) and provisions the REST Catalog, query services, and Sherpa on the selected Compute. The Lakehouse is ready when all components report healthy and the auto-created Depot is available.

Structure data

Once the Lakehouse is active, you create and govern its namespaces, schemas, tables, and views through the Lakehouse interface. This is the day-to-day shape of the data: how it is organized, what is exposed, and how it evolves. For the command reference and table-format details, see the Lakehouse command reference in the References.

Operating practices

  • One database per Lakehouse, as above. The most common Lakehouse failure traces back to a shared metastore database.

  • Name namespaces by domain or product, consistently, so consumers and developers can find data without asking.

  • Plan storage layout (bucket and relative path) before you provision; moving data later is costly.

  • Coordinate with developers. Products built in Build read and write Lakehouse tables; align table structure with the products that depend on it rather than changing it under them.

Who can read and write this data is access control; whether it is healthy is monitoring.

Last updated

Was this helpful?