Skip to main content

Sync Tables: Unity Catalog to Lakebase (Autoscaling)

Sync Unity Catalog tables into Lakebase Autoscaling Postgres as synced tables for low-latency application queries, with snapshot, triggered, or continuous modes.

Sync Tables: Unity Catalog to Lakebase (Autoscaling) preview

Build with AI

  1. Copy the prompt below
  2. Paste into Cursor, Claude Code, Codex, or any coding agent
  3. Your agent builds it — asking questions along the way so the result is exactly what you want

New to templates? Learn more here

When done, you will have:

  • A synced table in Unity Catalog tracking the replication pipeline
  • A read-only Postgres table in Lakebase queryable with low latency from any standard Postgres client
  • A managed Lakeflow pipeline keeping the data in sync via snapshot, triggered, or continuous mode

Prerequisites

This template creates a synced table that mirrors a Unity Catalog table into Lakebase Postgres. Verify these Databricks workspace features are enabled before starting.

  • Lakebase Autoscaling available. Run databricks postgres list-projects --profile <PROFILE> and confirm your Autoscaling project is listed. A not enabled error means Lakebase is not available to this identity.
  • CLI with synced-table support. Synced tables on Autoscaling projects are created with databricks postgres create-synced-table (Beta). Run databricks postgres create-synced-table --help and confirm the command exists; upgrade the Databricks CLI if it does not. You can also create synced tables through the Databricks UI (Catalog → source table → Create synced table).
  • Unity Catalog source table. Run databricks tables get <CATALOG>.<SCHEMA>.<SOURCE_TABLE> --profile <PROFILE> and confirm the source exists, then decide which column(s) will serve as the synced table's primary key — you pass them as primary_key_columns in the creation spec. The source does not need a declared primary key constraint.
  • Change Data Feed enabled on the source table (for Triggered / Continuous mode only). Skip this check if you plan to use Snapshot mode. Otherwise run the ALTER TABLE <catalog>.<schema>.<table> SET TBLPROPERTIES (delta.enableChangeDataFeed = true); statement from Step 1 against your SQL warehouse.