Skip to main content
Skip table of contents

incrementalReplication

You are looking at an older version of the documentation. The latest version is found here.

This procedure performs an incremental replication of the source into the target defined by the id and criterium columns.

Parameters

ParameterDescription
source_tableFully-qualified name of the source. Must be an existing table; mandatory
target_tableFully-qualified name of the target; mandatory
criteriumCriterium column name. This is the column name of the incremental field. Usually, this will be an integer/long or timestamp column. The procedure calculates the maximum value of this field and inserts/updates the records from the source table with a value larger than already existing in the target table; mandatory
idID column name to handle updated rows. If this parameter is specified, existing rows with a criterium larger than the maximum will be deleted and re-inserted to handle modified rows. If this parameter is omitted, all rows with a larger criterium will be inserted into the target table. If the key column exists in the source table, but was not specified, the result table will contain multiple entries for each key

Usage

SQL
CALL UTILS.incrementalReplication(
    source_table => 'datasourceSrc.sourceTable',
    target_table => 'datasourceTgt.targetTable',
    criterium => 'created_time',
	id => 'item_id'
);;
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.