Organization-Wide Policies

LakeOps lets you define and enforce compaction, retention, orphan cleanup, and maintenance policies across catalogs and tables. Set schedules, priorities, and target scopes — then let LakeOps execute continuously. Every run is recorded as an event, and every policy can be turned on or off with one toggle.

Why use policies?

Configuring optimization settings table-by-table works for a handful of tables, but doesn't scale. Policies let you define optimization rules once and apply them across hundreds or thousands of tables automatically.

  • •Consistency — every table gets the same optimization standards without manual setup
  • •Scale — onboard new tables automatically as they inherit catalog or namespace-wide policies
  • •Visibility — every policy run is recorded as an event, and the Policies screen shows each policy's next run, last run, and last update
  • •Control — enable or disable any policy instantly with a single toggle

How policies work

A policy is a named rule that applies a specific optimization operation to a set of tables on a schedule. Each policy has:

  • •A name and optional description
  • •A type (Adaptive Maintenance, Expire Snapshots, Create Tags, Remove Orphan Files, Rewrite Manifests, Compact Data Files, or Configuration)
  • •A scope (which tables it applies to)
  • •An execution schedule — cron expression, fixed interval, or manual-only
  • •An enable/disable toggle for instant control
  • •Type-specific settings (retention period, minimum snapshots, age threshold, etc.)

When enabled, LakeOps executes the policy on its schedule. You can also run any maintenance policy right away with Trigger Now on the Policies screen.

Adaptive Maintenance schedules differently: it runs automatically when table signals cross thresholds, or on a cron or fixed-interval schedule that runs only the operations each table needs.

Policy types

LakeOps supports the following policy types. When creating a new maintenance policy, you choose the operation type from the selection screen:

Adaptive Maintenance

Adaptive Maintenance bundles compaction, snapshot expiry, manifest rewrite, and delete-file handling into a single data-driven policy. LakeOps monitors table activity signals and runs the right operations at the right time, eliminating the need to configure each operation separately.

Key behavior

  • • When active on a table, it manages the individual compaction, snapshot retention, orphan cleanup, and manifest rewrite sections in the Optimization tab — those sections are locked
  • • Automatic runs operations when table signals cross thresholds; Scheduled checks on a cron or fixed interval and runs only the operations each table needs
  • • Configurable name, description, scope, and execution mode

Best for teams that want fully autonomous maintenance. See Adaptive Maintenance for how signals and thresholds work.

Expire Snapshots

Remove snapshots older than the retention period while respecting minimum retention count and concurrent readers. Keeps metadata lean and enables storage reclamation.

Configurable settings

  • • Retention period (use table config or custom days)
  • • Minimum snapshots to retain
  • • Delete associated metadata files (on/off)
  • • Delete associated files (on/off)
  • • Cron schedule

Learn more in Snapshot Management docs

Remove Orphan Files

Detect and safely remove unreferenced data files older than the configured age threshold. Reclaims storage from failed writes, expired snapshots, and dropped tables.

Configurable settings

  • • Retention threshold (default: 7 days)
  • • Cron schedule

Learn more in Orphan Cleanup docs

Rewrite Manifests

Consolidate manifest files to reduce metadata overhead and improve query planning performance across all connected engines.

Configurable settings

  • • Cron schedule

Learn more in Manifest Optimization docs

Compact Data Files

Merge small data files into files near a target size. Reduces file count, improves query performance, and lowers storage request costs.

Configurable settings

  • • Strategy: Binpack (default) or Sort (the table's sort order)
  • • Target file size in MB (default 512)
  • • Optional predicate on file metadata
  • • Use table properties instead of the settings above
  • • Schedule

Learn more in Compaction docs

Create Tags

Create Iceberg snapshot tags on a schedule from a name template, for example daily end-of-day tags you can time-travel to later.

Configurable settings

  • • Tag name template (e.g. eod-{yyyy}-{MM}-{dd})
  • • Retention: keep forever, or for a number of days (default 30)
  • • Schedule

Learn more in Snapshot Management docs

More policy types Alpha

Four more policy types appear in the console picker marked Soon.

  • • Remove Dangling Deletes and Rewrite Delete Files already run as part of Adaptive Maintenance. You can run either once, or save it as a scheduled policy, through the REST API or MCP (REMOVE_DANGLING_DELETES, REWRITE_POSITION_DELETE_FILES; neither takes config fields).
  • • Delete Policy and Truncate Policy are supported. A Delete policy removes tables in its scope, and a Truncate policy clears table data. The console marks both Soon; create them through the REST API or MCP (DELETE, TRUNCATE).

Configuration & Governance (UI label: Configuration)

Configuration & Governance policies let you enforce table-level settings, format standards, and operational guardrails across your organization. Instead of relying on teams to manually configure each table, define rules once and apply them everywhere.

What you can enforce

Under Table Properties, add key-value pairs. The property picker suggests the standard Iceberg table properties with their descriptions and defaults. Common choices:

  • • format-version — 2 upgrades v1 tables to v2. Iceberg can't downgrade a table.
  • • write.format.default — parquet, orc, or avro for new data files
  • • write.distribution-mode — none, hash, or range
  • • commit.retry.num-retries — commit retries (Iceberg default 4)
  • • write.parquet.compression-codec — zstd (default), brotli, lz4, gzip, snappy, or uncompressed
  • • write.target-file-size-bytes — target data file size (default 512 MB)
  • • history.expire.max-snapshot-age-ms — default maximum snapshot age for expiration (5 days)

How it's applied

On each table scan, LakeOps checks the tables in scope. With Override existing properties off (the default), it only adds properties the table doesn't have; a table that already sets a property to a different value keeps its value. Turn the switch on to replace differing values too. format-version is the exception: Iceberg doesn't store it as a regular property, so it is applied either way. Every change is logged as a Policy Enforced event.

Policies created in the console always write properties to tables. Through the REST API or MCP, set setOnTable to false and LakeOps leaves tables unchanged and records no event.

Example use cases

  • • Standardize format version — set format-version to 2 so v1 tables are upgraded and engines can use row-level deletes.
  • • Parquet by default — set write.format.default to parquet so new data files are written as Parquet.
  • • Set write distribution mode — set write.distribution-mode to hash on high-ingestion tables so writers group rows by partition, producing fewer, larger files.
  • • Governance for new tables — when a team creates a new table in a governed catalog, the configuration policy is applied on its next table scan — no manual setup required.

Policy scope

Policies can be scoped at different levels of your data hierarchy:

ScopeApplies toUse case
Per-tableA single specific tableCustom settings for critical or unusual tables
Per-namespaceAll tables in a namespaceTeam or domain-level standards
Per-catalogAll tables in a catalogEnvironment-level rules (prod, staging)
Organization-wideAll tables in every catalog (no catalog set)Baseline rules for the whole organization. Create these through the REST API or MCP; the console form requires a catalog.
Pattern matchNamespaces or tables whose names match a regular expression, for example prod_.*Cover a naming convention, including tables created later
Exclude listsSkip specific namespaces or tables within scope, by name or patternExempt critical tables from broad rules

A pattern must match the whole name: prod_.* matches prod_sales but not dev_prod_sales. Table entries can be a table name or a namespace.table name. Entries without special characters match exactly.

Precedence rules

More specific policies override broader ones. An enabled table-level policy (saved from the table's Optimization tab) always takes precedence for its operation type. Among policies from the Policies screen, the one whose scope matches the table most specifically wins (table, then namespace, then catalog, then organization-wide), then the higher priority, then the most recently created. This lets you set sensible defaults at the catalog level and override only where needed.

Policies screen

Navigate to Manage > Policies in the sidebar to access the central policy management screen. This is where you create, search, filter, and manage all policies across your organization.

Screen layout

ElementDescription
Create PolicyOpens the policy picker, then a form for the chosen type (name, scope, schedule, settings)
Search barFilter policies by name or description
Type filterFilter by policy type (All Types, Compact Data Files, Expire Snapshots, etc.)
Status filterFilter by enabled/disabled status (All Status, Enabled, Disabled)

Policy table columns

ColumnDescription
OnToggle switch to enable or disable the policy instantly
PolicyPolicy name and optional description (e.g. “Expire snapshots for all prod tables every 7 days”)
TypeColor-coded badge showing the policy type
Next RunWhen the policy will next execute (based on its schedule)
Last RunTimestamp of the most recent execution
UpdatedWhen the policy configuration was last modified
ActionsEdit, Trigger Now (run the policy immediately), and Delete

Creating a policy

1Click Create Policy in the top-right of the Policies screen.
2Pick a policy type, optionally filtering by category (Maintenance, Configuration, or Lifecycle). Maintenance types are Adaptive Maintenance, Expire Snapshots, Create Tags, Remove Orphan Files, Rewrite Manifests, and Compact Data Files; types marked Soon can't be selected in the console yet (see More policy types).
3Enter a policy name, optional description, and priority. Use descriptive names that reflect scope and purpose (e.g. prod_daily_snapshot_cleanup).
4Define the scope: select a catalog, then optionally narrow to specific namespaces or tables.
5Set the execution schedule: cron expression, fixed interval, or manual-only. Adaptive Maintenance instead offers Automatic or Scheduled, and Configuration policies apply on table scans.
6Configure type-specific settings (e.g. retention period and minimum snapshot count for Expire Snapshots), set the status, and click Create Policy.

Policies on a single table

Policies apply by scope; there is no separate assignment step. To see what covers one table, go to Data > Explore, select the table, and open the Optimization tab. Each operation card shows the policy that manages it:

  • •An Inherited badge and a link to the policy when it comes from the Policies screen, including any other policies that also match.
  • •The table's own settings when you saved them on the card, which take precedence over inherited policies.

Every run then appears in the table's Events tab. See Policy inheritance for overrides and exclusions.

Example: typical policy set

A production table typically has multiple policies covering different optimization operations:

StatusPolicyTypeSchedule
prod_adaptive_maintenanceAdaptive MaintenanceAutomatic
prod_table_defaultsConfigurationOn each table scan
prod_eod_tagsCreate TagsDaily at midnight
org_orphan_cleanupRemove Orphan FilesDaily at 3:00 AM

Adaptive Maintenance runs compaction, snapshot expiration, manifest rewrites, and delete-file cleanup when each table needs them. The configuration policy keeps table properties consistent, daily tags give you named restore points, and orphan cleanup runs daily at the catalog level to catch stragglers. Pair orphan cleanup with an enabled Expire Snapshots or Adaptive Maintenance policy in the same or a broader scope.

Policies vs. per-table Optimization tab

Both policies and the per-table Optimization tab configure the same underlying operations. The difference is scope and management:

Policies

  • • Managed centrally from the Policies screen
  • • Apply to many tables at once
  • • Next Run and Last Run on the Policies screen
  • • New tables in scope are covered automatically
  • • Best for catalog-wide and cross-namespace standards

Per-table Optimization tab

  • • Configured on individual tables
  • • Quick setup for one-off cases
  • • Override policy defaults when needed
  • • Includes Execute button for immediate runs
  • • Best for table-specific tuning

A common pattern: set catalog-wide policies for baseline hygiene, then use the per-table Optimization tab to override settings on tables that need special treatment.

Scheduling best practices

Scheduled policies run on a cron expression or a fixed interval. Consider these guidelines:

  • •Stagger schedules — avoid running compaction, snapshot expiration, and manifest rewrites at the same time. Spread them across different hours.
  • •Run during low-traffic windows — schedule heavy operations like compaction during off-peak hours to minimize impact on query workloads.
  • •Order matters — run snapshot expiration before orphan cleanup so that expired data files become detectable as orphans.
  • •Start conservative — begin with longer intervals and tighten as you observe results.

Recommended schedule

OperationFrequencyCron
Compact Data FilesDaily0 2 * * *
Expire SnapshotsHourly0 * * * *
Rewrite ManifestsDaily0 4 * * *
Remove Orphan FilesDaily0 3 * * *

Policy inheritance

When a policy is scoped at the catalog or namespace level, tables within that scope automatically inherit the policy. The per-table Optimization tab shows inherited policies with an Inherited badge.

  • •Inherited policies — shown with an amber badge indicating the source policy name and scope type. Clicking the policy name navigates to the governance policy.
  • •Table-level overrides — saving a table-level configuration creates a local policy that takes precedence over the inherited one. Removing the table policy reverts to the governance policy.
  • •Excluding a table — toggle off an inherited policy (for Adaptive Maintenance, click Disable for this table) to exclude the table from the governance policy without affecting other tables.

When Adaptive Maintenance is active for a table, it locks the individual operation sections in the Optimization tab. The notice indicates which governance policy manages the table.

Monitoring policy execution

Track policy health and impact through:

  • •Policies screen — Next Run, Last Run, and Updated columns show scheduling health and recent changes at a glance
  • •Events (Data > Events, or a table's Events tab) — every operation the policy ran, with status, duration, and impact
  • •Insights tab (per-table) — warnings that should resolve after policy-driven optimizations take effect
  • •Dashboard — 30-day operations count, storage cost savings, and data optimized reflect the cumulative impact of your policies