View: order_item_fulfillments

Source Tables Used In Script

Schema Table (or Derived Table) Name Table Type Purpose
uos order_item_fulfillments database Primary Source
drp fulfillment_cost database Obtain fulfillment and shipping cost for each fulfillment
drp_staging order_item_fulfillment_cost database Pre-insert
drp_staging order_item_fulfillments_to_update database Lookup
N/A last_sync_date derived Obtain last sync date for each record

SQL Flow

Calculated and Derived Fields

Target Column Target Column Data Type Source schema.table Source Column Transformation/Logic
fulfillment_cost DECIMAL drp.fulfillment_cost fulfillment_cost Sum(fulfillment cost/num_items) per order_line and __shop_id
shipping_cost DECIMAL drp.fulfillment_cost shipping_cost Sum(shipping cost/num_items) per order_line and __shop_id

 

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