adp.ingest.transform.merge

adp.ingest.transform.merge(snapshot: DataFrame, table_name: str, type_escalation_mode: TypeEscalationModeEnum, can_rewrite_history, keys: List[str], silver_type: SilverTypeEnum = SilverTypeEnum.merge_and_delete)

Merge the new snapshot on the silver_table using the keys specified

Modifies the silver table using INSERT, UPDATE and DELETE statements in such a way that silver replicates the snapshot.

Parameters:
  • snapshot (DataFrame) – The latest snapshot of the data you want to merge.

  • silver_table (str) – The name of the Delta table. This is the target table of the merge.

  • keys (List[str]) – The keys on which to merge, this is a list of column names that together make the primary key.

  • silver_type (SilverTypeEnum, optional) – Should the silver layer merge+delete or delete only. See SilverTypeEnum for more information. Defaults to SilverTypeEnum.MERGE_AND_DELETE.