On this page

CDC streaming table

mode: cdc requires a cdc_config block. Fields under write_target.cdc_config:

Minimal example

Add this entry to the actions list in your flowgroup.

- name: write_customer_silver
  type: write
  source: v_customer_bronze
  write_target:
    type: streaming_table
    mode: cdc
    catalog: "${catalog}"
    schema: "${silver_schema}"
    table: customer_dim
    cdc_config:
      keys: ["customer_id"]
      sequence_by: "last_modified_dt"
      scd_type: 2

Options

Key

Type

Default

Notes

keys

list[string]

required

Non-empty business keys.

sequence_by

string / list[string]

—

Ordering column(s); a list emits sequence_by=struct(...).

scd_type

int

1

1 or 2; emitted as stored_as_scd_type=.

ignore_null_updates

bool

—

—

apply_as_deletes

string

—

SQL expression.

apply_as_truncates

string

—

SQL expression; not allowed with scd_type: 2.

track_history_column_list

list[string]

—

scd_type: 2; mutually exclusive with track_history_except_column_list.

track_history_except_column_list

list[string]

—

scd_type: 2; mutually exclusive with track_history_column_list.

column_list

list[string]

—

Mutually exclusive with except_column_list.

except_column_list

list[string]

—

Mutually exclusive with column_list.

Shared table and view fields

These write_target fields apply to streaming_table and materialized_view. Sinks use their own field set.

Key

Type

Default

Notes

type

string

required

streaming_table, materialized_view, or sink.

catalog

string

—

UC catalog.

schema

string

—

UC namespace schema (not DDL — use table_schema for DDL).

table

string

—

Target table/view name.

create_table

bool

true

Streaming table only; snapshot_cdc and replace force true, and replace_where rejects false.

temporary

bool

false

Emitted as temporary=. temporary: true is rejected by replace_where.

private

bool

false

Emitted as private=. Creates the table for the pipeline’s lifetime without publishing it to the metastore; the dataset is visible only inside the pipeline.

comment

string

derived

Defaults to a description derived from the target table name.

table_properties

dict

—

Delta table properties.

tags

dict

—

UC tags {key: value}; applied by a generated tagging hook (REST API), not table DDL. See Unity Catalog tagging.

tags_file

string

—

Path to a unified schema/tags file (convention schemas/<table>.yaml) whose table-level tags and per-column tags supply UC tags. May be the same file as table_schema. Mutually exclusive with an inline tags mapping. See Schema and tag files.

partition_columns

list

—

Emitted as partition_cols=. Mutually exclusive with cluster_columns and cluster_by_auto: Databricks does not allow partitioning together with liquid clustering, so lhp validate and lhp generate reject the combination, even on an action with create_table: false. An empty list counts as unset.

cluster_columns

list

—

Liquid clustering; emitted as cluster_by=. With cluster_by_auto, these become the initial clustering keys. Mutually exclusive with partition_columns.

cluster_by_auto

bool

—

Auto liquid clustering. Can be combined with cluster_columns, which become the initial clustering keys; Databricks may later change the keys based on the workload. true is mutually exclusive with partition_columns.

spark_conf

dict

—

Spark configuration.

table_schema

string

—

Inline DDL, or a .ddl/.sql/.yaml/.json file path (auto-detected). A .yaml/.json file is the unified schema/tags file; its per-column type/nullable/comment are read here. Any UC tags it carries are ignored unless the same file is also set as tags_file — otherwise lhp generate warns LHP-CFG-069.

row_filter

string

—

Row-filter clause, emitted as row_filter=.

path

string

—

Storage location, emitted as path=.

database

string

—

Deprecated (removed at 1.0.0); use catalog + schema.

Added in version 0.9.2: The private field, for SDP private datasets that persist for the pipeline’s lifetime without being published to the metastore.

Action fields

These fields sit on the action, alongside write_target.

Field

Type

Default

Requirement and behaviour

name

string

required

Action name, unique within the flowgroup.

type

string

required

Always write.

source

string / list

conditional

Input view(s). Standard streaming writes and most sinks accept a list. CDC, replace, replace_where and foreachbatch use one view. Snapshot CDC takes its source inside snapshot_cdc_config. Materialized views require one of action source, target sql or target sql_path.

write_target

mapping

required

Target settings; type selects streaming_table, materialized_view or sink.

description

string

derived

Comment/docstring for the generated flow or view.

readMode

string

stream

stream or batch for standard streaming-table append flows. Replace requires streaming; replace_where reads in batch and rejects stream. Materialized views use batch queries; sinks use streaming reads. The read must match the kind of the view it reads, or lhp validate fails with LHP-VAL-070; a batch read in a standard streaming-table flow also needs once: true.

once

bool

false

Emits once=True for standard append and CDC flows. Not emitted for snapshot CDC, replace, replace_where, materialized views or sinks.

operational_metadata

bool / list

—

Accepted on the model; writes do not add metadata columns. Select columns on load or supported transform actions instead.

depends_on

list[string]

—

Extra upstream table/view references. See Dependency analysis reference.