Cortex Framework v6 compatibility

The v6 compatibility layer provides schema-compatible views and tables for Google Cloud Cortex Framework v6 SAP workloads inside the Cortex Framework v7 architecture. Deploying cortex_v6_compatibility lets you adopt the v7 build and orchestration framework without rewriting existing Looker dashboards, LookML models, or downstream SQL consumers.

Supported data sources

The cortex_v6_compatibility namespace supports SAP ECC and SAP S/4HANA data sources exclusively. Existing Cortex Framework v6 Salesforce workloads migrate directly to the standard v7 Salesforce data foundation and Salesforce data product modules (cortex.sfdc.*).

How it works

The v6 compatibility layer acts as an adapter between conformed v7 foundations and legacy v6 reporting consumers:

  • Schema-compatible views: Exposes PascalCase reporting view names, column names, and data types matching Cortex Framework v6.
  • Target dataset isolation: Deploys compatibility models from a separate namespace (cortex_v6_compatibility) into a dedicated BigQuery target dataset so compatibility views never collide with standard v7 tables.

Deploy the compatibility content

Complete the following steps to deploy cortex_v6_compatibility:

  1. Configure a dedicated BigQuery target dataset.
  2. Register the cortex_v6_compatibility namespace and enable all compatibility modules in config/config.yaml.
  3. Run the Cortex Framework build and deployment CLI.
  4. Execute the generated Dataform pipelines.

Dedicated target dataset

Deploy cortex_v6_compatibility to its own BigQuery dataset to prevent physical table collisions with standard v7 data products:

data:
  datasets:
    - id: product_target
      projectId: TARGET_PROJECT_ID
      datasetId: prod_sap_dataproducts # Core v7 tables
    - id: cortex_v6_compatibility_target
      projectId: TARGET_PROJECT_ID
      datasetId: prod_sap_cortex6 # Compatibility v6 tables

Replace the following:

  • TARGET_PROJECT_ID: the destination Google Cloud project ID for your BigQuery datasets, for example: my-target-project.

Configure Cortex Framework

Register the cortex and cortex_v6_compatibility namespaces and set enabled: true on the sap_cortex_v6_compatibility_* modules in config/config.yaml:

  • sap_cortex_v6_compatibility_master_data
  • sap_cortex_v6_compatibility_accounts_payable
  • sap_cortex_v6_compatibility_finance
  • sap_cortex_v6_compatibility_inventory
  • sap_cortex_v6_compatibility_purchasing
  • sap_cortex_v6_compatibility_sales

Because data.namespaces acts as a strict allowlist when present, you must include cortex alongside cortex_v6_compatibility so compatibility modules can bind to cortex.sap.foundations.sap. Omit path for built-in namespaces.

The following example enables sap_cortex_v6_compatibility_inventory and binds its cross-module dependencies:

data:
  datasets:
    - id: cortex_v6_compatibility_target
      projectId: TARGET_PROJECT_ID
      datasetId: prod_sap_cortex6

  namespaces:
    - name: cortex
    - name: cortex_v6_compatibility

  modules:
    products:
      - moduleId: sap_cortex_v6_compatibility_inventory
        modulePath: cortex_v6_compatibility.sap.products.inventory
        enabled: true # If using configuration file based on config.yaml.example, ensure the `enabled` flag is set to `true`
        syncToKc: false
        dependencyBindings:
          sapModule: erp
          sapMasterData: sap_cortex_v6_compatibility_master_data
          sapSales: sap_cortex_v6_compatibility_sales
        dataTargetId: cortex_v6_compatibility_target
        moduleSettings:
          targetCurrencies: ['USD']
          rateType: 'M'

#    You must ensure the `enabled` flag is set to `true` for all of the listed dependent modules. In this example:
#   `sap_cortex_v6_compatibility_master_data`
#   `sap_cortex_v6_compatibility_sales`

Replace the following:

  • TARGET_PROJECT_ID: the destination Google Cloud project ID, for example: my-target-project.

SAP client (mandt) and product moduleSettings

Compatibility models read the SAP client from moduleSettings.mandt on the SAP foundation module bound to sapModule. Configure mandt as a 3-character alphanumeric string ([0-9A-Za-z]{3}, for example "100"); invalid or missing values fail Dataform compilation:

  • cost_centers and profit_centers (SAP S/4HANA), fiscal_date_dim, vendor_lead_time_overview, vendor_performance_overview, and models joining fiscal_date_dim on client (such as FinancialStatement) filter rows to this configured SAP client.
  • balance_sheet and profit_and_loss convert amounts to target currencies for this client, and on SAP ECC StockCharacteristicsConfig seeds movement-type mappings for this client (if upgrading an SAP ECC deployment whose client isn't "100", run stock_weekly_snapshots and stock_monthly_snapshots once with full refresh).

You can also customize per-module moduleSettings in config/config.yaml (see config/config.yaml.example for defaults):

  • sap_cortex_v6_compatibility_accounts_payable: targetCurrencies (['USD']), rateType ('M'), paymentDocTypes (['KZ', 'ZP']), cashDiscountTransactionKey ('SKE'), parkedInvoiceStatuses (['A', 'B']), and invoiceDocTypes (['RE', 'RN', 'KR', 'KG', 'RA']).
  • sap_cortex_v6_compatibility_finance: targetCurrencies (['USD']), receivablesTargetCurrency (optional), rateType ('M'), languages, profitCenterHierarchySubclass ('A000'), and costCenterHierarchySubclass ('A000').
  • sap_cortex_v6_compatibility_inventory and sap_cortex_v6_compatibility_purchasing: targetCurrencies (['USD']), rateType ('M'), and languages.
  • sap_cortex_v6_compatibility_sales: languages (['E']).

Operational requirements

Enable all compatibility modules in config/config.yaml together. Compatibility models contain cross-module dependencies (for example, billing models reference master data dimensions, and inventory snapshot views reference the fiscal date dimension), so enabling a subset causes unresolved ctx.ref errors during Dataform compilation.

Inventory snapshots

Keep stock_weekly_snapshots and stock_monthly_snapshots configured with materializationType: incremental (the default):

  • Initial run: Processes the full movement history to establish baseline stock quantities and values.
  • Subsequent runs: Detects movements replicated since the previous run using recordstamp (stored in source_last_updated_at), rather than posting date, so late postings into an already written period are included. Each incremental run deletes and rebuilds every period starting from the earliest touched period (including later periods without additional movements) and carries forward each stock key's cumulative balance from that key's most recent remaining period.
  • Full-refresh trade-offs: Running these tables in full-refresh mode recalculates the full historical movement log from scratch on every run, which increases query scan cost. Incremental runs don't detect physical deletes in the source (for example, archived material documents) or posting-date changes that move a movement to a later period. Run a full refresh when you need to remove archived or moved movements from cumulative totals.

Build and deploy the compatibility content

Build and deploy the compatibility modules by following the Deployment guide and Post-deployment steps.

Known limitations

Customizations and custom reporting views aren't included in cortex_v6_compatibility. The compatibility modules cover standard Cortex Framework v6 SAP views only. If you want to migrate your customizations and custom reporting views from Cortex Framework v6, contact your Google sales representative.