Plan to Actual Code

This page provides detailed instructions on the Plan to Actual Code transform code block and what should be added to the Script Manifest file in order to execute the code

Script Manifest File (YML)

Upstream Transformation Dependencies

This code block is dependent on the following upstream code blocks being implemented:

  • Initialization

  • UOS

  • UMS

  • Google Analytics

  • Order Status

  • Order Channel and Marketing

Transformation Code Requirements

The following code should be added to the main workflow in the appropriate position, after Order and Order Line Revenue and before Customer per the Transform Code Sequence - DRP page

  #--------------------------------------------------------------------------------------------------------------------
  # SECTION: 4400_DAILY_PLAN_TO_ACTUALS
  # DEPENDENCIES:
  #   - Section: 0500_UOS
  #   - Section: 1500_UMS
  #   - Section: 2600_GA
  #   - Section: 2700_ORDER_STATUS
  #   - Section: 3000_CHANNEL
  # REQUIRED: No
  # PURPOSE: This code the DRP tables for Company Metrics / Plan to Actual and should be enabled once the upstream
  # blocks are enabled
  #--------------------------------------------------------------------------------------------------------------------
  company_metrics:
    integrations:
      - google_analytics
    scripts:
      - "github://platform-sql-shared/scripts/base/4400_company_metrics/4400_PFT_BAS_daily_company_metrics.sql"
      - "github://platform-sql-shared/scripts/base/4400_company_metrics/4401_PFT_BAS_daily_plan_to_actual.sql"
      - "github://platform-sql-shared/scripts/base/4400_company_metrics/4402_PFT_BAS_daily_plan_to_actual_marketing.sql"

Plan to Actual

Add this code to enable plan to actual analysis by creating the following tables:

  • [drp.daily_plan_to_actual]

  • [drp.daily_plan_to_actual_marketing]

Calculate the daily metrics and populate the tables

Last updated