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 |
|---|---|---|---|
|
list[string] |
required |
Non-empty business keys. |
|
string / list[string] |
— |
Ordering column(s); a list emits |
|
int |
|
|
|
bool |
— |
— |
|
string |
— |
SQL expression. |
|
string |
— |
SQL expression; not allowed with |
|
list[string] |
— |
|
|
list[string] |
— |
|
|
list[string] |
— |
Mutually exclusive with |
|
list[string] |
— |
Mutually exclusive with |
Action fields¶
These fields sit on the action, alongside write_target.
Field |
Type |
Default |
Requirement and behaviour |
|---|---|---|---|
|
string |
required |
Action name, unique within the flowgroup. |
|
string |
required |
Always |
|
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 |
|
mapping |
required |
Target settings; |
|
string |
derived |
Comment/docstring for the generated flow or view. |
|
string |
|
|
|
bool |
|
Emits |
|
bool / list |
— |
Accepted on the model; writes do not add metadata columns. Select columns on load or supported transform actions instead. |
|
list[string] |
— |
Extra upstream table/view references. See Dependency analysis reference. |