Updated on 2026-08-13 GMT+08:00

UPDATE FROM

Function

Updates the value of a field in the destination table based on the value of that field in the source table.

Syntax Format Supported for Lineage Parsing

UPDATE {schema_name}.{table_name1} SET col1 = b.col2 FROM {schema_name}.{table_name2} b

Example Statement

UPDATE public.dws_table_2 target
SET 
    target.col1 = source.col1,
    target.col2 = source.col2,
    target.update_time = source.update_time
FROM public.dws_table_1 source
WHERE target.id = source.id;