View: Intermediary DRP Table(s): drp.order_channel_source

Source Database Table

drp.order_channel_source

Script that Populates Database Table

3060_CHN_BAS_order_channel_source_insert.sql

Script Description and Logic

Pulls in the records generated by order_channel_influencer_discount_code, order_channel_influencer_utm and order_channel_discount_code_mapping from drp_staging.order_channel_source and inserts them into drp.order_channel_source table. Incremental functionality is included such that only the records that require an update or are new get inserted into the final drp.order_channel_source table. The records in staging are compared to those in the final table. Any orders that match are removed from the final table and updated by way of insertion from staging (upsert). The records that appear in staging, but not in the final table are inserted into drp.order_channel_source.

Source Tables Used In Script

Schema Table (or Derived Table) Name Table Type Purpose
drp_staging order_channel_source database Primary

SQL Flow

Calculated and Derived Fields

 N/A

 

All content © Daasity 2021. Do not copy, share or distribute.