Initialization Code

This page provides detailed instructions on the Initialization 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

There are no dependencies on upstream code blocks

Transformation Code Requirements

The following code should be added at the start of the main workflow to ensure that all the required tables that are used in the Daasity data models are generated prior to executing the transformation code

  #--------------------------------------------------------------------------------------------------------------------
  # SECTION: 0100_INITIALIZATION
  # DEPENDENCIES: None
  # REQUIRED: Yes
  # PURPOSE: These SQL scripts are required for all merchants to setup the data models and mapping tables that are
  # used in downstream code
  #--------------------------------------------------------------------------------------------------------------------
  initialization:
    scripts:
      - "github://platform-sql-shared/scripts/pro/0000_one_time_initialization/0020_OTI_create_uos_tables.sql"
      - "github://platform-sql-shared/scripts/base/0000_one_time_initialization/0030_OTI_create_uns_tables.sql"
      - "github://platform-sql-shared/scripts/pro/0000_one_time_initialization/0040_OTI_create_ums_tables.sql"
      - "github://platform-sql-shared/scripts/base/0000_one_time_initialization/0050_OTI_create_uts_tables.sql"
      - "github://platform-sql-shared/scripts/base/0000_one_time_initialization/0060_OTI_create_retail_calendar.sql"
      - "github://platform-sql-shared/scripts/base/0100_initialization/0110_INI_BAS_data_validation.sql"
      - "github://platform-sql-shared/scripts/base/0100_initialization/0120_INI_BAS_retail_calendar.sql"
      - "github://platform-sql-shared/scripts/base/0100_initialization/0130_INI_BAS_integration_mapping.sql"
      - "github://platform-sql-shared/scripts/base/0100_initialization/0130_INI_BAS_integration_mapping_amazon.sql"
      - "github://platform-sql-shared/scripts/base/0100_initialization/0140_INI_BAS_currency_exchange_rates.sql"
      - "github://platform-sql-shared/scripts/base/0100_initialization/0160_INI_BAS_amazon_currency_mapping.sql"

One-Time Initialization

Add all of these scripts to your initial or main workflow that executes transformation

These one-time initialization scripts create the tables for the Unified schemas. Integration transformation code will fail if these scripts do not first create the tables.

Initialization

Add these scripts at the top of your daily workflow to make sure calendars, currency exchange rates and integration mapping are all refreshed

Reset the table to help track completion of all your scripts and validate uniqueness across different entities

Update the daily calendar to easily analyze performance for calendar based dimensions like "Yesterday", "Last Week", "Last Year", etc.

Map your integrations to transform code to ensure that different platforms (GA to Ecommerce) are appropriately linked

Update the currency exchange rates and Amazon currency exchange rates

Last updated