Transformation Configuration Setup

This page provides instructions on what transform code should be added to a script manifest file to transform Target Unified+ data into the Unified Order System Schema (UOS).

Overview

The Target Unified+ extractor provides data on orders, products, customers, inventory, and financial transactions from Target's marketplace platform. The Daasity transformation code maps data from the Target Unified+ schema into the Unified Order System Schema (UOS) for reporting and analysis.

Feature Dependencies

You must have enabled our Code Repository feature in order to both access the Daasity transformation code as well as modify a Script Manifest File enabling this code to execute.

We recommend you review the Transformation Configuration section of our Help documentation to familiarize yourself with our workflow engine and script manifest files.

Script Manifest File (YML)

Upstream Transformation Dependencies

This code will not complete successfully unless the Initialization Code that creates the UOS tables is executed prior to this Target Unified+ UOS code in this workflow. Required initialization scripts include:

  • UOS schema tables (0020_OTI_create_uos_tables.sql)

  • Currency exchange rates (0140_INI_BAS_currency_exchange_rates.sql)

  • Custom revenue configuration (0170_INI_BAS_custom_revenue.sql)

Transformation Code Requirements

To enable the data transformation from the Target Unified+ schema into UOS, Daasity recommends the following code be added to any Script Manifest File and Workflow:

uos_target_plus:
  conditional_integrations: target_plus
  scripts:
    - "github://platform-sql-shared/scripts/base/0500_uos/target_plus/0570_UOS_BAS_TARGET_locations.sql"
    - "github://platform-sql-shared/scripts/base/0500_uos/target_plus/0572_UOS_BAS_TARGET_customers.sql"
    - "github://platform-sql-shared/scripts/base/0500_uos/target_plus/0573_UOS_BAS_TARGET_products.sql"
    - "github://platform-sql-shared/scripts/base/0500_uos/target_plus/0574_UOS_BAS_TARGET_product_variants.sql"
    - "github://platform-sql-shared/scripts/base/0500_uos/target_plus/0575_UOS_BAS_TARGET_orders.sql"
    - "github://platform-sql-shared/scripts/base/0500_uos/target_plus/0576_UOS_BAS_TARGET_order_line_items.sql"
    - "github://platform-sql-shared/scripts/base/0500_uos/target_plus/0577_UOS_BAS_TARGET_order_discount_codes.sql"
    - "github://platform-sql-shared/scripts/base/0500_uos/target_plus/0578_UOS_BAS_TARGET_order_shipping_service.sql"
    - "github://platform-sql-shared/scripts/base/0500_uos/target_plus/0579_UOS_BAS_TARGET_order_payments.sql"
    - "github://platform-sql-shared/scripts/base/0500_uos/target_plus/0580_UOS_BAS_TARGET_transactions.sql"
    - "github://platform-sql-shared/scripts/base/0500_uos/target_plus/0581_UOS_BAS_TARGET_refunds.sql"
    - "github://platform-sql-shared/scripts/base/0500_uos/target_plus/0582_UOS_BAS_TARGET_refund_line_items.sql"
    - "github://platform-sql-shared/scripts/base/0500_uos/target_plus/0583_UOS_BAS_TARGET_fulfillments.sql"
    - "github://platform-sql-shared/scripts/base/0500_uos/target_plus/0584_UOS_BAS_TARGET_order_item_fulfillments.sql"
    - "github://platform-sql-shared/scripts/base/0500_uos/target_plus/0585_UOS_BAS_TARGET_current_inventory_levels.sql"
    - "github://platform-sql-shared/scripts/base/0500_uos/target_plus/0586_UOS_BAS_TARGET_sales_report.sql"

We recommend this code be added within a UOS block that transforms all your ecommerce integrations into the appropriate UOS tables.

If you do not add the above code to a Script Manifest File and create a Workflow with the Script Manifest File added to the workflow, the data extracted from Target Unified+ will not be transformed into the downstream UOS tables.

UOS Sales Report

The following code will transform Target Unified+ sales data into the uos.sales_report table:

  • github://platform-sql-shared/scripts/base/0500_uos/target_plus/0586_UOS_BAS_TARGET_sales_report.sql

This script calculates gross_sales, net_sales, discount_amount, refund_amount, and custom_revenue fields with currency conversion applied.

UOS Orders and Order Line Items

The following code will transform Target Unified+ order data into the UOS order tables:

  • uos.orders - github://platform-sql-shared/scripts/base/0500_uos/target_plus/0575_UOS_BAS_TARGET_orders.sql

  • uos.order_line_items - github://platform-sql-shared/scripts/base/0500_uos/target_plus/0576_UOS_BAS_TARGET_order_line_items.sql

UOS Customers, Products, and Locations

The transformation scripts also populate the following UOS tables:

  • uos.customers - Customer data from orders

  • uos.products - Product catalog data

  • uos.product_variants - Product variant data

  • uos.locations - Distribution center and location data

  • uos.transactions - Financial transaction data

  • uos.refunds - Refund transaction data

These tables are populated by the respective transformation scripts listed in the YML block above.

Last updated

Was this helpful?