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
PascalCasereporting 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:
- Configure a dedicated BigQuery target dataset.
- Register the
cortex_v6_compatibilitynamespace and enable all compatibility modules inconfig/config.yaml. - Run the Cortex Framework build and deployment CLI.
- 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_datasap_cortex_v6_compatibility_accounts_payablesap_cortex_v6_compatibility_financesap_cortex_v6_compatibility_inventorysap_cortex_v6_compatibility_purchasingsap_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_centersandprofit_centers(SAP S/4HANA),fiscal_date_dim,vendor_lead_time_overview,vendor_performance_overview, and models joiningfiscal_date_dimon client (such asFinancialStatement) filter rows to this configured SAP client.balance_sheetandprofit_and_lossconvert amounts to target currencies for this client, and on SAP ECCStockCharacteristicsConfigseeds movement-type mappings for this client (if upgrading an SAP ECC deployment whose client isn't"100", runstock_weekly_snapshotsandstock_monthly_snapshotsonce 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']), andinvoiceDocTypes(['RE', 'RN', 'KR', 'KG', 'RA']).sap_cortex_v6_compatibility_finance:targetCurrencies(['USD']),receivablesTargetCurrency(optional),rateType('M'),languages,profitCenterHierarchySubclass('A000'), andcostCenterHierarchySubclass('A000').sap_cortex_v6_compatibility_inventoryandsap_cortex_v6_compatibility_purchasing:targetCurrencies(['USD']),rateType('M'), andlanguages.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 insource_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.