Deployment configuration
This page explains the deployment configuration options for Google Cloud Cortex Framework across two configuration files:
- Deployment configuration (
config/config.yaml): Defines environment variables, build settings, dataset mappings, row- and column-level security policies, module registrations (foundations,catalogs, andproducts), deployment targets, conversational analytics data agents, and Gemini agent registration. - Table settings (
table_settings.yaml): Controls module-specific table scope, materialization strategies, partitioning, clustering, labels, tags, declarative data quality assertions, and row- and column-level security in BigQuery.
This page also includes Examples and How-to guides for common customization and multi-instance deployment scenarios.
Configuration file: config/config.yaml
The config/config.yaml file—typically initialized from the
config/config.yaml.example template—is the primary workspace configuration
for a Cortex Framework deployment. Relative
data.namespaces[].path and tableSettings paths resolve relative to the
directory that contains config/config.yaml. Relative
conversationalAnalytics.agents[].agentSettings paths use a three-step
resolution order (the configuration file directory, the workspace root, and the
packaged agents/ directory). For Git deployment targets,
auth.credentialsPath and auth.sshKnownHostsPath expand ~ and resolve
relative to the current working directory. Relative local repositoryUrl paths
(such as ./repo or ../repo) resolve relative to the current working
directory, but repositoryUrl doesn't expand ~ and rejects values starting
with ~. Use camelCase key naming canonically across all configuration
files; schema validation rejects unknown keys in config/config.yaml
(including data.security and gemini) and external agent_settings.yaml
files. Most config/config.yaml blocks reject snake_case keys, though
data.modules.catalogs accepts legacy snake_case aliases for backward
compatibility (catalog_id, project_id, project, dataset_id,
listing_id, binds_namespaces, connection_settings, and
inline_table_settings), and agent_settings.yaml accepts either camelCase
or snake_case names for defined fields.
config/config.yaml is organized into five top-level blocks:
- Build environment (
buildEnvironment) (optional): Configures the Google Cloud project billed for build-time metadata queries (such as reading SAPDD03Lor inspecting BigQuery schemas), conversational analytics data agent provisioning, and Gemini registration. You can omit this block in local build or compile-only workflows that don't inspect BigQuery schemas or provision agents. - Data (
data): Configures BigQuery dataset locations, workspace-wide assertion settings, row- and column-level security policies, module namespaces (cortex,cortex_samples, andcortex_v6_compatibility), source and target dataset mappings, and active module instances (foundations,catalogs, andproducts). - Deployment (
deployment) (optional): Configures one or more target deployment destinations (type: dataformworkspaces ortype: gitrepositories) where compiled Dataform artifacts are synchronized. You can omit this block in local build or compile-only workflows without deployment targets. - Conversational analytics (
conversationalAnalytics) (optional): Configures BigQuery conversational analytics data agents provisioned and synchronized byuv run cortex-create-ca-agents. - Gemini (
gemini) (optional): Configures the Gemini app and published conversational analytics data agents registered byuv run cortex-register-gemini-agents.
Environment variable substitution
Before validating the YAML schema, Cortex Framework expands
$VAR_NAME and ${VAR_NAME} placeholders across all string values in
config/config.yaml using your active shell environment:
buildEnvironment:
buildProjectId: "${CORTEX_BUILD_PROJECT_ID}"
data:
datasets:
- id: sap_raw
projectId: "${SAP_RAW_PROJECT_ID}"
datasetId: cortex_sap_raw
Keep the following rules in mind when using environment variable placeholders:
- Every referenced variable must be set in your environment before running a
uv run cortex-*command. Unresolved placeholders fail configuration loading immediately with a validation error. - Escape a literal dollar sign as
$$so the preprocessor preserves$without attempting variable substitution. ${ref(...)}tokens used in row- and column-level security row filter predicates are preserved verbatim by the preprocessor for build-time Dataform reference resolution and don't need to be escaped as$${ref(...)}.
Build environment
The buildEnvironment block specifies the Google Cloud project billed
for build-time metadata inspection jobs:
buildEnvironment:
buildProjectId: YOUR_BUILD_PROJECT_ID
Replace the following:
YOUR_BUILD_PROJECT_ID: Google Cloud project ID billed for build-time BigQuery schema inspection jobs, conversational analytics data agent provisioning, and Gemini registration, for example:my-cortex-build-project.
The following table describes the buildEnvironment parameters:
| Parameter | Meaning | Default value | Description |
|---|---|---|---|
buildEnvironment.buildProjectId |
Build project ID | None | Google Cloud project ID where build-time schema inspection queries execute, conversational analytics data agents are provisioned, and Gemini apps and agents are registered. Required when conversationalAnalytics.enabled is true with enabled agents, or when gemini.enabled is true. |
buildEnvironment.timeout |
Timeout (seconds) | None | Optional reserved integer field accepted by the configuration schema. It has no runtime effect on client RPC timeouts. |
Data section overview
The data section defines your BigQuery region, assertion
settings, row- and column-level security policies, module namespaces, dataset
mappings, and module instances:
data:
# Geographic location for BigQuery datasets (for example: US, EU, us-central1).
bigQueryLocation: US
# Data quality assertion settings.
assertionsEnabled: true
defaultAssertionDataset: "dataform_assertions"
# assertionSeverities: ["P0", "P1", "P2"]
# defaultAssertionSeverity: "P1"
# Optional row- and column-level security (CLS/RLS) settings.
# security:
# enabled: true
# autoGrantDataformServiceAccount: true
# policyTags: {}
# domainRules: []
# Optional strict allowlist of active module namespaces.
# Omit `namespaces` to auto-discover; omit `path` for built-in namespaces or
# installed `cortex.namespaces` wheels.
namespaces:
- name: cortex
- name: cortex_samples
- name: cortex_v6_compatibility
# Local custom namespace (resolved relative to config/config.yaml):
# - name: custom_domain
# path: ../src/data_modules/custom_domain
# Named BigQuery source and target dataset mappings.
datasets:
- ...
# Data foundation, external catalog, and data product module instances.
modules:
foundations:
- ...
catalogs:
- ...
products:
- ...
Data: BigQuery location
Defines the geographic location of your BigQuery source and target datasets. For regional availability, see BigQuery locations and Dataform locations.
| Parameter | Meaning | Default value | Description |
|---|---|---|---|
data.bigQueryLocation |
BigQuery location | None (for example, US) |
Required top-level field in DataConfig specifying the BigQuery multi-region or region for all datasets in data.datasets[] (for example, US, EU, us-central1, or europe-west1). Also serves as the default provisioning location for conversational analytics data agents and Gemini apps when their respective location override is omitted, and determines where golden-query dry runs execute. |
Data: Data quality assertions
Defines workspace-wide settings for
declarative data quality assertions
across data foundations and data products. Assertions are enabled globally by
default (data.assertionsEnabled: true) on tables that declare an assertions
block and can also be controlled per table (assertions.enabled: false) or per
rule (enabled: false) in table_settings.yaml or inlineTableSettings.
| Parameter | Meaning | Default value | Description |
|---|---|---|---|
data.assertionsEnabled |
Global assertion switch | true |
Global kill-switch for all declarative data quality assertions across foundations and data products. Set to false to suppress all generated Dataform assertion views, downstream blocking dependencies, and in-transaction SAP CDC assertion checks without editing table_settings.yaml; build-time schema and template validation still runs against declared rules. |
data.defaultAssertionDataset |
Assertion views dataset | dataform_assertions |
BigQuery dataset ID where Dataform materializes compiled assertion views in each target project. Validated and provisioned automatically when data.assertionsEnabled is true and you pass --create-datasets to uv run cortex-deploy or uv run cortex-build-and-deploy. Configure a unique dataset ID per deployment when multiple Cortex Framework workspaces share the same target project. |
data.assertionSeverities |
Allowed severity levels | None | Optional non-empty allowlist of custom severity identifiers matching ^[a-zA-Z0-9_-]+$ (for example, [P0, P1, P2]). Must be configured together with data.defaultAssertionSeverity; attaches a severity_<value> Dataform tag to every generated assertion. |
data.defaultAssertionSeverity |
Default assertion severity | None | Default severity assigned to assertion rules that omit a per-rule severity attribute. Required when data.assertionSeverities is set and must belong to that allowlist. |
Data: Row- and column-level security
The optional data.security block configures global
row- and column-level security (Tier 1)
and module-scoped domain rules (Tier 2) across materialized
BigQuery tables built by Dataform. It registers
logical aliases for Data Catalog policy tag URIs, manages automatic
Dataform pipeline service account bypass grants, and applies
baseline column policy tags and mandatory row filters across matching modules:
data:
security:
enabled: true
autoGrantDataformServiceAccount: true
# Optional fallback email (bare or with "serviceAccount:" prefix) when a
# dataform target omits serviceAccount:
# pipelineServiceAccount: "dataform-sa@example.com"
policyTags:
pii_tax_id: projects/TAXONOMY_PROJECT_ID/locations/us/taxonomies/TAXONOMY_ID/policyTags/POLICY_TAG_ID
domainRules:
- name: sap_finance_governance
enabled: true
modulePaths:
- "cortex.sap.foundations.*"
- "cortex.sap.products.vendors"
# moduleIds: ["erp"]
columnTags:
- policyTag: pii_tax_id
allowTableOverride: false
matchExact: ["stcd1", "stcd2"]
matchSuffix: ["_stcd1"]
mandatoryRowFilters:
- name: sap_bukrs_entitlement
allowTableOverride: false
applyIfColumnsExist: ["bukrs"]
defaultGrantees:
- group:sap-finance-analysts@DOMAIN
filterPredicate: >-
bukrs IN (
SELECT company_code
FROM ${ref("security_entitlements", "user_company_codes")}
WHERE user_email = SESSION_USER()
)
Replace the following:
TAXONOMY_PROJECT_ID: Google Cloud project ID hosting the Data Catalog taxonomy, for example:my-governance-project.TAXONOMY_ID: numeric Data Catalog taxonomy ID.POLICY_TAG_ID: numeric Data Catalog policy tag ID.DOMAIN: organization domain for your BigQuery row access policy grantee group, for example:example.com.
The following table describes the data.security parameters:
| Parameter | Meaning | Default value | Description |
|---|---|---|---|
data.security.enabled |
Global security switch | true |
Global switch for declarative row- and column-level security. Set to false to skip Tier 2 domain rules and Tier 3 table security resolution workspace-wide and skip Data Catalog pre-flight checks during cortex-deploy, cortex-build-and-deploy (type: dataform), cortex-demo, and cortex-apply-security (cortex-build doesn't run Data Catalog pre-flight checks, and still rejects explicit Tier 3 security blocks on view models even when data.security is omitted or enabled: false). Running uv run cortex-apply-security with enabled: false tears down previously applied Cortex Framework column policy tags and managed row access policies in BigQuery; deleting the data.security block instead exits as a no-op and leaves existing tags and policies attached. |
data.security.autoGrantDataformServiceAccount |
Automatic pipeline bypass | true |
When true, appends the reserved cortex_pipeline_sa_bypass row access policy (predicate TRUE) on tables with active row-level security so the Dataform execution service account can read upstream governed tables. Resolves the service account from deployment.targets[].targetSettings.serviceAccount first and falls back to data.security.pipelineServiceAccount. |
data.security.pipelineServiceAccount |
Fallback pipeline service account | None | Optional fallback service account email used for cortex_pipeline_sa_bypass when an enabled type: dataform target omits targetSettings.serviceAccount (for example, the default Dataform service agent service-PROJECT_NUMBER@gcp-sa-dataform.iam.gserviceaccount.com), or when only type: git targets are enabled. Accepts either a bare email or an email with a serviceAccount: prefix (stripped automatically, matching targetSettings.serviceAccount). |
data.security.policyTags |
Policy tag alias map | {} |
Map of logical alias keys to full Data Catalog policy tag URIs matching projects/<project>/locations/<location>/taxonomies/<taxonomy>/policyTags/<tag>. Alias keys must be non-empty and can't start with projects/. |
data.security.domainRules |
Domain security rules | [] |
Ordered list of Tier 2 domain rules scoping column policy tags and mandatory row filters to matching foundation and product modules. Every enabled domain rule, columnTags entry, and mandatoryRowFilters entry must match at least one enabled materialized table or column, or the build fails. |
domainRules[].name |
Domain rule name | None | Required unique identifier for the domain rule (case-insensitive across data.security.domainRules). |
domainRules[].enabled |
Domain rule switch | true |
Specifies whether this domain rule (including both columnTags and mandatoryRowFilters) is active. Set to false on Day 2 to tear down column policy tags and row filters managed by this rule across matching tables (unless kept active by another rule or Tier 3 override). |
domainRules[].modulePaths |
Module path globs | None | Optional non-empty list of unique, case-sensitive fnmatch glob patterns matched against each module's modulePath (for example, cortex.sap.*). At least one of modulePaths or moduleIds is required; when both are set, they combine with logical AND. |
domainRules[].moduleIds |
Exact module IDs | None | Optional non-empty list of unique exact moduleId values (for example, erp or sap_accounts_payable). At least one of modulePaths or moduleIds is required; when both are set, they combine with logical AND. |
domainRules[].columnTags |
Column policy tag rules | [] |
List of Tier 2 column-level security rules. Each entry defines a policyTag (alias from data.security.policyTags or full URI), optional enabled (default true), optional allowTableOverride (default false), and at least one selector in matchExact or matchSuffix (both enforce case-insensitive uniqueness and are matched case-insensitively). |
domainRules[].mandatoryRowFilters |
Mandatory row filters | [] |
List of Tier 2 row-level security filters applied whenever all columns in applyIfColumnsExist (unique, case-insensitive) are present on a matching table. Each entry defines a unique name (can't be cortex_pipeline_sa_bypass), optional enabled (default true), optional allowTableOverride (default false), and—when enabled—non-empty filterPredicate (supporting non-self-referencing ${ref(...)} lookup-table tokens) and defaultGrantees. When multiple Tier 2 filters match a table without Tier 3 rowAccessPolicies, their defaultGrantees are intersected (disjoint grantee sets fail validation with CortexConfigError). |
Data: Cortex Framework namespaces
Namespaces map logical module prefixes in modulePath to built-in packages,
installed Python wheel packages (cortex.namespaces entry points), or local
directories containing module manifests, Dataform definitions,
annotations, and default table settings. Cortex Framework ships
three built-in namespaces:
cortex: Curated Cortex Framework data foundations and source-aligned or domain data products.cortex_samples: Consumption solution sample data products, such as Sales Performance Insights and Supplier Spend Analysis.cortex_v6_compatibility: Backward-compatible Version 6 compatibility SAP reporting views.
The data.namespaces key is optional and controls how
Cortex Framework discovers modules:
- Strict allowlist (when
namespacesis present): Listingdata.namespaces(includingnamespaces: []) restricts discovery strictly to the listed namespaces. Any module whose prefix isn't in the list isn't indexed. - Auto-discovery (when
namespacesis omitted): Omitting thedata.namespaceskey automatically discovers all built-in namespaces and installedcortex.namespaceswheel entry points. - Explicit
nullrejected: Settingnamespaces: null(or leaving the key with all entries commented out) fails configuration validation. - Multi-root override stacking: You can list the same namespace
namemore than once to patch individual shipped modules without copying the entire namespace. Entries are searched in listed order—for example, placing- name: cortexwithpath: ../src/data_modules/cortex_overrideahead of a pathless- name: cortexentry replaces matchingmodulePathdirectories wholesale while keeping all other shippedcortexmodules and builders available.
You can also register custom namespaces or third-party namespaces to isolate your organization's custom modules (see Namespaces).
The following table describes the data.namespaces parameters:
| Parameter | Meaning | Default value | Description |
|---|---|---|---|
data.namespaces |
Active module namespaces | Omitted (auto-discovery) | Optional. Omit this key to automatically discover all built-in namespaces and installed cortex.namespaces wheel packages. Setting a list (including []) enforces a strict allowlist; setting namespaces: null (such as commenting out all list items) raises a validation error. |
data.namespaces[].name |
Namespace identifier | None | Required. Namespace prefix used as the first segment of modulePath (for example, cortex, cortex_samples, or cortex_v6_compatibility). Must be a valid non-keyword Python identifier and can't collide with Python standard library modules, reserved Cortex Framework packages (common, tools, data_modules, dataform_includes, tests), or installed third-party packages that don't advertise a matching cortex.namespaces entry point. |
data.namespaces[].path |
Namespace directory path | None | Optional. Local file system path to a custom namespace or override root directory, resolved relative to config/config.yaml (or absolute). Omit path for built-in namespaces (cortex, cortex_samples, cortex_v6_compatibility) and installed third-party or partner cortex.namespaces wheel packages so Python discovers them through package entry points. Setting a legacy built-in data_modules/<namespace> path emits a deprecation warning and falls back to the built-in namespace root on wheel installations where that local path doesn't exist; setting any other nonexistent local path fails validation. |
Data: Sources and target datasets
The data.datasets list maps logical dataset IDs to physical Google Cloud
projects and BigQuery datasets. Foundation and product modules
reference these entries by id in dataSourceId and dataTargetId:
datasets:
- id: sap_raw
projectId: YOUR_SOURCE_PROJECT_ID
datasetId: cortex_sap_raw
- id: sap_foundation
projectId: YOUR_TARGET_PROJECT_ID
datasetId: cortex7_sap_data_foundation
- id: sfdc_raw
projectId: YOUR_SOURCE_PROJECT_ID
datasetId: cortex_sfdc_raw
- id: sfdc_foundation
projectId: YOUR_TARGET_PROJECT_ID
datasetId: cortex7_sfdc_data_foundation
- id: product_target
projectId: YOUR_TARGET_PROJECT_ID
datasetId: cortex7_data_products
- id: samples_target
projectId: YOUR_TARGET_PROJECT_ID
datasetId: cortex7_samples
- id: cortex_v6_compatibility_target
projectId: YOUR_TARGET_PROJECT_ID
datasetId: cortex_v6_compatibility
Replace the following:
YOUR_SOURCE_PROJECT_ID: Google Cloud project ID hosting your raw replicated source datasets, for example:my-cortex-source-project.YOUR_TARGET_PROJECT_ID: Google Cloud project ID hosting your conformed foundation and analytical data product datasets, for example:my-cortex-target-project.
The following table describes the data.datasets parameters:
| Parameter | Meaning | Default value | Description |
|---|---|---|---|
data.datasets[].id |
Logical dataset ID | None | Required. Unique logical identifier referenced by dataSourceId or dataTargetId (for example, sap_raw, sap_foundation, or product_target). |
data.datasets[].projectId |
Project ID | None | Required. Google Cloud project ID hosting the BigQuery dataset. |
data.datasets[].datasetId |
BigQuery dataset ID | None | Required. Physical BigQuery dataset name. All datasets in data.datasets[] reside in the location specified by data.bigQueryLocation. |
Data: Modules
The data.modules block registers the transformation and catalog modules that
assemble your Dataform dependency graph across the following lists:
foundations(aliasfoundationis also accepted)catalogsproducts(aliasproductis also accepted)
Data: Modules: Foundations
This section configures data foundation modules
that conform raw replicated source tables into standardized latest-record
tables in BigQuery. If your source dataset already provides
deduplicated latest records, set external: true to point downstream products
directly at dataSourceId without building target foundation tables.
modules:
foundations:
# SAP ERP foundation module instance.
- moduleId: erp
modulePath: cortex.sap.foundations.sap
dataSourceId: sap_raw
dataTargetId: sap_foundation
moduleSettings:
sapVersion: s4
# Required metadata only; doesn't filter foundation or product rows.
mandt: "100"
enabled: true
external: false
# Mutually exclusive: specify either an external file path or inline overrides.
# tableSettings: "cortex/sap/foundations/sap/table_settings.yaml"
# inlineTableSettings:
# common:
# - source:
# tableName: bkpf
# Salesforce foundation module instance.
- moduleId: sfdc
modulePath: cortex.sfdc.foundations.sfdc
dataSourceId: sfdc_raw
dataTargetId: sfdc_foundation
enabled: true
external: false
# tableSettings: "cortex/sfdc/foundations/sfdc/table_settings.yaml"
The following table describes the data.modules.foundations parameters:
| Parameter | Meaning | Default value | Description |
|---|---|---|---|
moduleId |
Module identifier | None | Required. Unique identifier for the foundation module instance (for example, erp or sfdc), referenced by downstream dependencyBindings. |
modulePath |
Module path | None | Required. Namespaced dot-path to the foundation module (for example, cortex.sap.foundations.sap or cortex.sfdc.foundations.sfdc). |
dataSourceId |
Source dataset reference | None | Required. References the id in data.datasets containing raw inbound source tables. |
dataTargetId |
Target dataset reference | None | References the id in data.datasets where conformed foundation tables materialize. Required when external is false; must be omitted when external is true (setting both fails validation). |
moduleSettings.sapVersion |
SAP system version | None | Required for SAP ERP foundation modules using the sap_foundation builder (for example, cortex.sap.foundations.sap). Selects dialect-specific logic and table settings: ecc (SAP ECC) or s4 (SAP S/4HANA). |
moduleSettings.mandt |
SAP client (Mandant) | None | Required SAP client identifier for SAP ERP foundation modules using the Forwarded to downstream modules in |
enabled |
Module enablement | true |
Specifies whether the foundation module is built and deployed. |
external |
External foundation | false |
When true, skips generating target foundation tables and routes downstream data products directly to dataSourceId. |
tableSettings |
External table settings path | ../src/data_modules/{namespace_dir}/{system_type}/foundations/{system_sub_type}/table_settings.default.yaml |
Optional path to a custom Recommended custom path: |
inlineTableSettings |
Inline table settings | None | Optional inline table settings embedded directly in config/config.yaml, validated against the same foundation schema as an external table_settings.yaml file. Mutually exclusive with tableSettings. |
Data: Modules: Catalogs
Catalog modules let Cortex Framework reference external zero-copy tables without physical replication. Cortex Framework supports the following catalog types:
lakehouse_delta_share: Connects to BigLake Delta Sharing catalogs and shares (such as SAP Business Data Cloud).analytics_hub: Connects to linked BigQuery datasets subscribed through BigQuery sharing (formerly Analytics Hub), such as Google WeatherNext forecasts, Dun & Bradstreet commercial datasets, public or partner data exchanges, cross-organization shares, and Salesforce Data 360.
modules:
catalogs:
# BigLake Delta Sharing catalog (for example, SAP Business Data Cloud).
- id: sap_bdc_catalog
type: lakehouse_delta_share
bindsNamespaces: [sap_bdc]
connectionSettings:
catalogId: sap_bdc_catalog
projectId: SAP_BDC_CATALOG_PROJECT_ID
location: europe-west3
shares:
- shareId: customer_v1_he2_100_p8123
- shareId: salesorder_v1_he2_100_p8124
# Optional table filter (mutually exclusive: tableSettings or inlineTableSettings).
# tableSettings: "sap_bdc/table_settings.yaml"
# enabled: true
# BigQuery Sharing (Analytics Hub) linked dataset catalog (for example, Salesforce Data 360).
- id: sfdc_data_cloud_catalog
type: analytics_hub
bindsNamespaces: [sfdc_data_cloud]
connectionSettings:
projectId: LINKED_DATASET_PROJECT_ID
datasetId: LINKED_DATASET_ID
location: US
# listingId: "projects/PROVIDER_PROJECT/locations/US/dataExchanges/EXCHANGE_ID/listings/LISTING_ID"
inlineTableSettings:
tables:
- UnifiedIndividual__dlm
- UnifiedAccount__dlm
# Optional variant-specific table lists (for example, s4: [acdoca]):
# variants:
# s4:
# - acdoca
# Optional variant domain bindings (for example, {sap: s4}):
# variants:
# sap: s4
# enabled: true
# Commercial or public BigQuery Sharing catalog (for example, Google WeatherNext).
- id: ah_weathernext_catalog
type: analytics_hub
bindsNamespaces: [cortex.external.weathernext]
connectionSettings:
projectId: LINKED_DATASET_PROJECT_ID
datasetId: WEATHERNEXT_DATASET_ID
location: US
inlineTableSettings:
tables:
- weathernext_3_0_0
# Downstream product modules can bind to analytics_hub catalogs using:
# - 1-part catalog ID: dependencyBindings: { weatherCatalog: ah_weathernext_catalog }
# - 2-part table binding: dependencyBindings: { weatherNext: ah_weathernext_catalog.weathernext_3_0_0 }
Replace the following:
SAP_BDC_CATALOG_PROJECT_ID: Google Cloud project ID hosting the BigLake Delta Sharing catalog, for example:my-sap-bdc-catalog-project.LINKED_DATASET_PROJECT_ID: Google Cloud project ID hosting the subscribed BigQuery sharing linked dataset, for example:my-analytics-hub-project.LINKED_DATASET_ID: BigQuery dataset ID of your subscribed Salesforce Data 360 linked dataset, for example:sfdc_data_360_linked.WEATHERNEXT_DATASET_ID: BigQuery dataset ID of your subscribed WeatherNext linked dataset, for example:weathernext_linked.
The following table describes the data.modules.catalogs parameters:
| Parameter | Meaning | Default value | Description |
|---|---|---|---|
id |
Catalog identifier | None | Required. Unique identifier for the external catalog module instance. |
type |
Catalog type | lakehouse_delta_share |
Catalog technology type. Allowed values are lakehouse_delta_share and analytics_hub. |
bindsNamespaces |
Bound namespaces | [] |
Logical namespace prefixes bound by this catalog (for example, [sap_bdc], [sfdc_data_cloud], or [cortex.external.weathernext]). |
variants |
Variant domain bindings | None | Optional map of variant domains to active variant values (for example, {sap: s4}) used when versioned downstream data products bind to this catalog without an upstream foundation supplying that variant domain. |
connectionSettings.projectId |
Project ID | None | Required. Google Cloud project ID hosting the Delta Sharing catalog or subscribed BigQuery sharing linked dataset. |
connectionSettings.location |
Location | None | Geographic location for the catalog (required for lakehouse_delta_share; optional for analytics_hub, where pre-flight validation warns if it differs from the physical BigQuery dataset location). |
connectionSettings.catalogId |
Physical catalog ID | None | Required for lakehouse_delta_share. Physical BigLake catalog ID. |
connectionSettings.shares |
Delta Sharing shares | [] |
For lakehouse_delta_share: list of Delta Sharing shares to import, each specifying a shareId. |
connectionSettings.datasetId |
Linked dataset ID | None | Required for analytics_hub. BigQuery dataset ID of the subscribed linked dataset, validated during pre-flight checks for existence, link state, and regional compatibility with data.bigQueryLocation. |
connectionSettings.listingId |
Listing resource path | None | Optional for analytics_hub. Source listing resource path (projects/.../locations/.../dataExchanges/.../listings/...) used by uv run cortex-metadata and regional availability checks. |
tableSettings |
External table filter path | None | Optional for lakehouse_delta_share. Path to a CatalogTableSettings YAML file (declaring at least one table across tables or variants) resolved relative to config/config.yaml. Mutually exclusive with inlineTableSettings. |
inlineTableSettings |
Inline table settings | None | Required for analytics_hub (a CatalogTableSettings map declaring at least one shared table or view name across tables or variants exposed as Dataform sources); optional for lakehouse_delta_share (mutually exclusive with tableSettings). |
enabled |
Catalog enablement | true |
Specifies whether the catalog is enabled. |
Data: Modules: Products
Data product modules define the joins, currency
conversions, and calculations that transform foundation tables, catalog sources,
or upstream data products into consumption-ready tables and views. See
config/config.yaml.example in the repository for the complete list of prebuilt
SAP, Salesforce, sample (cortex_samples), and compatibility
(cortex_v6_compatibility) product entries. The shipped
cortex_v6_compatibility modules are
sap_cortex_v6_compatibility_accounts_payable,
sap_cortex_v6_compatibility_finance,
sap_cortex_v6_compatibility_inventory,
sap_cortex_v6_compatibility_master_data,
sap_cortex_v6_compatibility_purchasing, and
sap_cortex_v6_compatibility_sales.
modules:
products:
# Curated SAP source-aligned data product (cortex namespace).
- moduleId: sap_purchasing_organizational_structure
modulePath: cortex.sap.products.purchasing_organizational_structure
dependencyBindings:
sapModule: erp
dataTargetId: product_target
enabled: true
syncToKc: true
# tableSettings: "cortex/sap/products/purchasing_organizational_structure/table_settings.yaml"
# Curated Salesforce consumption data product (cortex namespace).
- moduleId: sfdc_opportunity_pipeline
modulePath: cortex.sfdc.products.opportunity_pipeline
dependencyBindings:
sfdcAccounts: sfdc_accounts
sfdcConfiguration: sfdc_configuration
sfdcCurrencyAndConversion: sfdc_currency_and_conversion
sfdcOpportunities: sfdc_opportunities
sfdcProductsAndPricing: sfdc_products_and_pricing
dataTargetId: product_target
enabled: true
syncToKc: true
# Sample consumption data product (cortex_samples namespace).
- moduleId: sap_sales_performance
modulePath: cortex_samples.sap.products.sales_performance
dependencyBindings:
sapCustomers: sap_customers
sapMaterials: sap_materials
sapSalesOrganizationalStructure: sap_sales_organizational_structure
sapSalesDocuments: sap_sales_documents
sapDeliveryDocuments: sap_delivery_documents
dataTargetId: samples_target
enabled: false
syncToKc: false
# Version 6 compatibility data products (cortex_v6_compatibility namespace).
# Product moduleSettings and bound foundation moduleSettings (mandt, sapVersion)
# are serialized into compiled includes/config.js files.
- moduleId: sap_cortex_v6_compatibility_master_data
modulePath: cortex_v6_compatibility.sap.products.master_data
dependencyBindings:
sapModule: erp
dataTargetId: cortex_v6_compatibility_target
enabled: false
syncToKc: false
moduleSettings:
targetCurrencies: ["USD", "EUR"]
rateType: "M"
languages: ["E", "S"]
- moduleId: sap_cortex_v6_compatibility_finance
modulePath: cortex_v6_compatibility.sap.products.finance
dependencyBindings:
sapModule: erp
sapMasterData: sap_cortex_v6_compatibility_master_data
dataTargetId: cortex_v6_compatibility_target
enabled: false
syncToKc: false
moduleSettings:
targetCurrencies: ["USD", "EUR"]
rateType: "M"
profitCenterHierarchySubclass: "A000"
costCenterHierarchySubclass: "A000"
The following table describes the data.modules.products parameters:
| Parameter | Meaning | Default value | Description |
|---|---|---|---|
moduleId |
Module identifier | None | Required. Unique identifier for the data product module instance, referenced by downstream dependencyBindings and conversational analytics dataProducts. |
modulePath |
Module path | None | Required. Namespaced dot-path to the product directory (for example, cortex.sap.products.sales_documents, cortex_samples.sap.products.sales_performance, or cortex_v6_compatibility.sap.products.finance). |
dataTargetId |
Target dataset reference | None | Required. References the id in data.datasets where output tables and views materialize (such as product_target or samples_target). |
dataSourceId |
Optional source dataset reference | None | Optional reference to an id in data.datasets for product modules that read directly from a configured source dataset. |
dependencyBindings |
Upstream dependencies | {} |
Maps logical dependency keys declared in the module's For SAP ECC deployments copied from |
moduleSettings |
Product module parameters | None | Optional map of module-level parameters validated at build time and passed to compiled Dataform models (alongside upstream foundation settings such as Used by |
enabled |
Module enablement | true |
Specifies whether the data product module is built and deployed. |
syncToKc |
Knowledge Catalog sync | true |
Controls whether the data product metadata is synchronized to Knowledge Catalog. |
tableSettings |
External table settings path | ../src/data_modules/{namespace_dir}/.../table_settings.default.yaml |
Optional path to a sparse custom Recommended custom path: |
inlineTableSettings |
Inline table settings | None | Optional inline table settings embedded directly in config/config.yaml, validated against the product's table settings schema. Mutually exclusive with tableSettings. |
Deployment environment
Cortex Framework supports deploying compiled Dataform
packages directly to managed Dataform workspaces (type: dataform) or
to remote and local Git repositories (type: git). For workflow details and
authentication patterns, see Deployment.
deployment:
targets:
- type: dataform
enabled: true
targetSettings:
repositoryProjectId: YOUR_REPO_PROJECT_ID
repositoryRegion: us-central1
repositoryName: cortex-repository
workspaceName: dev
ignoredPaths: ["definitions/custom"]
# serviceAccount: "dataform-sa@example.com"
- type: git
enabled: false
targetSettings:
repositoryUrl: YOUR_GIT_REPO_URL
branch: main
targetDir: ""
commitMessage: "Deploy Cortex Framework artifacts {timestamp}"
authorEmail: "deployer@example.com"
authorName: "Cortex Deployer"
push: true
ignorePatterns:
- "README.md"
- "definitions/custom/**"
skipPreflightChecks: false
auth:
credentialsEnvVar: GIT_DEPLOY_TOKEN
strictHostKeyChecking: true
allowSystemAuth: true
Replace the following:
YOUR_REPO_PROJECT_ID: Google Cloud project ID hosting your Dataform repository, for example:my-cortex-repo-project.YOUR_GIT_REPO_URL: SSH, HTTPS, HTTP, or local (file://or file system path) target Git repository location, for example:https://github.com/my-org/cortex-dataform.git.
The following table describes the parameters for deployment.targets:
| Parameter | Meaning | Default value | Description |
|---|---|---|---|
type |
Deployment target type | None | Required. Target deployer plugin: dataform (syncs files to a Google Cloud Dataform workspace) or git (commits and pushes files to a Git repository). |
enabled |
Target enablement | true |
Specifies whether the deployment target runs during uv run cortex-deploy or uv run cortex-build-and-deploy. |
targetSettings.repositoryProjectId |
Repository project ID (dataform) |
None | Required for type: dataform. Google Cloud project ID where the Dataform repository is managed. |
targetSettings.repositoryRegion |
Repository region (dataform) |
None | Required for type: dataform. Google Cloud region for the Dataform repository (for example, us-central1 or europe-west1). |
targetSettings.repositoryName |
Repository name (dataform) |
None | Required for type: dataform. Name of the target Dataform repository. |
targetSettings.workspaceName |
Workspace name (dataform) |
None | Required for type: dataform. Name of the Dataform workspace updated during deployment. |
targetSettings.serviceAccount |
Service account email (dataform) |
None | Optional custom service account email configured when creating a Dataform repository. Accepts either a bare email or an email with a serviceAccount: prefix. Also serves as the primary service account for automatic cortex_pipeline_sa_bypass row access policy grants when data.security.autoGrantDataformServiceAccount is true (takes precedence over data.security.pipelineServiceAccount; see Dataform pipeline service account bypass). |
targetSettings.ignoredPaths |
Ignored workspace paths (dataform) |
["definitions/custom"] |
Non-empty relative workspace paths excluded bi-directionally during Dataform workspace reconciliation: remote files and directories under Paths are normalized to POSIX format (stripping leading and trailing slashes) and matched strictly on path-segment boundaries ( |
targetSettings.repositoryUrl |
Git repository URL (git) |
None | Required for type: git. Target repository location using SCP-style SSH (git@...), ssh://..., https://..., http://..., file:///..., or a local file system path. Local file system paths must start with /, ./, ../, file://, or a Windows drive letter; bare relative directory names without ./ are rejected. Unsupported schemes (such as git://) are rejected, and any inline URL credentials are automatically redacted in logs (prefer targetSettings.auth for credentials). |
targetSettings.branch |
Target Git branch (git) |
main |
Branch reconciled and committed to during Git deployment. If missing on a non-empty remote, the deployer prompts for confirmation before creating it (or auto-confirms with --yes). |
targetSettings.targetDir |
Repository subdirectory (git) |
"" |
Optional relative subdirectory inside the Git repository where compiled artifacts are reconciled (leading slashes, .. traversal, and .git paths are rejected). Sibling directories outside targetDir remain untouched. |
targetSettings.commitMessage |
Git commit message (git) |
"Deploy Cortex Framework artifacts {timestamp}" |
Commit message template; {timestamp} expands to the runtime UTC timestamp (YYYY-MM-DD HH:MM:SS UTC). |
targetSettings.authorEmail |
Git commit email (git) |
None | Optional in When set, |
targetSettings.authorName |
Git commit display name (git) |
None | Optional Git author and committer display name for the commit. When set, overrides both user.name and the GIT_AUTHOR_NAME and GIT_COMMITTER_NAME environment variables. When omitted or whitespace-only (normalized to None), Git uses your configured user.name or GIT_AUTHOR_NAME and GIT_COMMITTER_NAME environment variables; if git config user.name isn't set, the deployer passes -c user.name="Cortex Deployer" as a fallback (which those environment variables still override). Must not contain angle brackets (<, >) or control characters. Omit this parameter to use your own Git configuration, such as for signed commits. |
targetSettings.push |
Push commit to remote (git) |
true |
When true, pushes the commit to origin (fast-forward only; force pushes are disabled); set to false to validate reconciliation and commit locally without pushing. |
targetSettings.ignorePatterns |
Protected Git globs (git) |
[] |
fnmatch glob patterns relative to targetDir that protect existing repository files and directories from overwrite or deletion during reconciliation (.git is always protected). |
targetSettings.skipPreflightChecks |
Skip remote preflight check (git) |
false |
Skips the git ls-remote remote connectivity and branch check before cloning. |
targetSettings.auth.credentialsEnvVar |
Credentials environment variable (git) |
None | Name of an environment variable holding SSH private key content or an HTTPS credential (username:token or raw personal access token). Mutually exclusive with auth.credentialsPath. |
targetSettings.auth.credentialsPath |
Credentials path (git) |
None | File system path to a readable, non-empty SSH private key file or HTTPS token file. Mutually exclusive with auth.credentialsEnvVar. |
targetSettings.auth.strictHostKeyChecking |
Strict SSH host key verification (git) |
true |
When true, the deployer uses OpenSSH default host key checking with BatchMode=yes for SSH remotes instead of explicitly passing StrictHostKeyChecking=yes. When false, the deployer disables host key checking by passing StrictHostKeyChecking=no and UserKnownHostsFile=/dev/null. |
targetSettings.auth.sshKnownHostsPath |
Custom SSH known_hosts path (git) |
None | Optional path to a custom SSH known_hosts file for enterprise Git hosts. The deployer uses this file only when auth.strictHostKeyChecking is true and ignores it when auth.strictHostKeyChecking is false. |
targetSettings.auth.allowSystemAuth |
Allow ambient Git or SSH credentials (git) |
true |
Allows falling back to system Git credential helpers or ssh-agent when explicit auth credentials are omitted. Set to false in shared CI runners to require explicit credentials. |
Conversational analytics (conversationalAnalytics)
The optional top-level conversationalAnalytics block configures
BigQuery conversational analytics data
agents provisioned and synchronized by
uv run cortex-create-ca-agents
after your Dataform pipelines materialize target tables in
BigQuery. DataAgent resources are created in
buildEnvironment.buildProjectId in conversationalAnalytics.location (or the
normalized lowercase region from data.bigQueryLocation when location is
omitted). Set location: global to make agents appear in the
BigQuery Agents Hub UI.
conversationalAnalytics:
enabled: true
location: global # Optional: defaults to lowercased data.bigQueryLocation; use global for BigQuery Agents Hub UI.
agents:
# Option 1: Modular agent referencing an external agent_settings.yaml file
# (resolved relative to config/, workspace root, or packaged src/agents/).
- agentId: cortex-sap-financial-analysis-agent
# displayName: "Financial Analysis Agent"
enabled: true
contextVersion: published
agentSettings: ../src/agents/cortex/sap/financial_analysis/agent_settings.yaml
# Option 2: Self-contained inline agent configuration.
- agentId: sfdc-opportunity-pipeline-agent
displayName: "Salesforce Opportunity Pipeline Agent"
enabled: true
contextVersion: published
inlineAgentSettings:
description: "Answers pipeline and win-rate questions on Salesforce opportunities."
labels:
domain: "sales"
source: "sfdc"
dataProducts:
- id: sfdc_opportunity_pipeline
includeTables:
- opportunity_pipeline
- opportunity_pipeline_overview
inlineSystemInstruction: |
You are a sales operations analyst assistant. Base pipeline metrics
on open, non-deleted opportunities unless asked otherwise.
goldenQueries:
- question: "What is the open pipeline amount by stage?"
inlineSql: |
SELECT
opportunity_stage_name,
SUM(total_sale_amount_corporate_currency) AS open_pipeline_amount
FROM `{sfdc_opportunity_pipeline.project_id}.{sfdc_opportunity_pipeline.dataset_id}.opportunity_pipeline`
WHERE NOT COALESCE(is_opportunity_closed, FALSE)
AND NOT COALESCE(is_deleted, FALSE)
GROUP BY 1
ORDER BY open_pipeline_amount DESC
options:
enablePythonAnalysis: false
maxBilledBytes: 10737418240
The following table describes the conversationalAnalytics parameters in
config/config.yaml:
| Parameter | Meaning | Default value | Description |
|---|---|---|---|
conversationalAnalytics.enabled |
Global enablement | true |
Specifies whether conversational analytics synchronization runs when you invoke uv run cortex-create-ca-agents. Requires buildEnvironment.buildProjectId when true with enabled agents. |
conversationalAnalytics.location |
Agent provisioning location | Lowercased data.bigQueryLocation |
Optional Google Cloud location override for conversational analytics DataAgent resources (for example, global, us, eu, us-east4, or europe-west2; normalized to lowercase). Use global to display agents in the BigQuery Agents Hub UI. Golden-query dry runs still execute in data.bigQueryLocation. |
agents[].agentId |
Agent resource ID | None | Required. Unique Google Cloud DataAgent resource ID (1 to 63 lowercase letters, digits, or hyphens, starting with a letter and not ending with a hyphen). |
agents[].displayName |
Display name override | None | Human-readable name (1 to 256 characters) shown in BigQuery Studio. Required if displayName isn't set inside agentSettings or inlineAgentSettings. |
agents[].enabled |
Agent enablement | true |
Specifies whether this agent entry is reconciled during synchronization. |
agents[].contextVersion |
Context slot | published |
Target context slot on the DataAgent resource. Allowed values are published and staging. |
agents[].agentSettings |
External settings path | None | Path to an external YAML settings file, resolved in order: (1) relative to config/config.yaml, (2) relative to the workspace/repository root, and (3) from the packaged src/agents/ directory inside an installed cortex wheel when the relative path contains an agents segment. Mutually exclusive with inlineAgentSettings. |
agents[].inlineAgentSettings |
Inline settings map | None | Inline agent context definition following the same schema as an external agent_settings.yaml file. Mutually exclusive with agentSettings. |
The following table describes the fields supported inside an external
agent_settings.yaml file or an inlineAgentSettings block:
| Parameter | Meaning | Default value | Description |
|---|---|---|---|
displayName |
Default display name | None | Optional default display name (1 to 256 characters), overridden when agents[].displayName is set. |
description |
Agent description | None | Required summary description of the agent's purpose and domain (1 to 1,024 characters). |
labels |
Resource labels | {} |
Optional map of up to 63 user-defined lowercase Google Cloud labels out of the 64-label DataAgent resource limit. Keys must match ^[a-z][a-z0-9_-]{0,62}$ and values must match ^[a-z0-9_-]{0,63}$. Cortex Framework reserves one slot for the managed cortex-framework-version label. |
dataProducts |
Referenced data products | None | Required non-empty list of enabled product modules (knowledge sources) with id matching moduleId or module name in data.modules.products, plus an optional non-empty includeTables subset of enabled module tables. |
systemInstruction / inlineSystemInstruction |
System prompt | None | Mutually exclusive path to an external Markdown or text file (resolved relative to agent_settings.yaml) or inline instruction string guiding SQL generation and domain rules. |
schemaRelationships |
Join relationships | [] |
Optional explicit join definitions pairing leftTable and rightTable (dataProduct, table, columns) with an optional confidenceScore (0.0 to 1.0, default 1.0). |
glossaryTerms |
Business glossary | [] |
Optional list of domain terms (displayName, description, and optional labels). |
goldenQueries |
Verified queries | [] |
Optional list of natural-language question entries paired with sql (external path) or inlineSql—supporting {<product>.project_id}, {<product>.dataset_id}, and camelCase aliases {<product>.projectId} and {<product>.datasetId}—and optional parameters (name, dataType, description). Validated with zero-cost BigQuery dry runs. |
options.enablePythonAnalysis |
Python code interpreter | false |
Enables or disables Python analysis execution inside the data agent. |
options.maxBilledBytes |
Maximum billed bytes | 10737418240 |
Per-query BigQuery maximum bytes billed guardrail (10 GiB by default, up to 500 GB; set to null to omit). |
Gemini (gemini)
The optional top-level gemini block registers published
conversational analytics data agents inside a Gemini app
(Discovery Engine engine) using
uv run cortex-register-gemini-agents.
You can also pass --create-app to create or update the app on demand before
registering agents. For prerequisites and end-to-end steps, see
Gemini integration.
gemini:
enabled: true
app:
appId: cortex-gemini-assistant
displayName: "Cortex Gemini Assistant" # Required with --create-app
location: global # Optional: defaults to lowercased data.bigQueryLocation
companyName: "Example Corp"
agents:
- agentId: cortex-sap-financial-analysis-agent
# displayName: "Financial Analysis Agent" # Optional override
enabled: true
- agentId: sfdc-opportunity-pipeline-agent
enabled: true
The following table describes the gemini parameters in
config/config.yaml:
| Parameter | Meaning | Default value | Description |
|---|---|---|---|
gemini.enabled |
Global enablement | true |
Specifies whether uv run cortex-register-gemini-agents runs. Requires buildEnvironment.buildProjectId when true. |
gemini.app.appId |
App resource ID | None | Required. Unique Discovery Engine engine ID (1 to 63 lowercase letters, digits, hyphens, or underscores, starting with a lowercase letter or digit and not ending with a hyphen). |
gemini.app.displayName |
App display name | None | Human-readable app name (1 to 256 characters). Required when creating or updating the app with --create-app; optional when registering agents into an existing app. |
gemini.app.location |
App location | Lowercased data.bigQueryLocation |
Optional Discovery Engine location override (for example, global, us, or eu; normalized to lowercase). Must be a location supported by discoveryengine.googleapis.com. |
gemini.app.companyName |
Company name | None | Optional organization name stored on the app when using --create-app. If omitted on subsequent runs, preserves the existing server-side value. |
gemini.agents[].agentId |
Registered agent ID | None | Required. Unique ID (same format as conversationalAnalytics.agents[].agentId) matching an enabled agent in conversationalAnalytics.agents. |
gemini.agents[].displayName |
Agent display name override | None | Optional display name (1 to 256 characters) shown in Gemini. Defaults to the referenced conversational analytics agent's displayName. |
gemini.agents[].enabled |
Agent registration switch | true |
Specifies whether this agent is registered when you run uv run cortex-register-gemini-agents. |
Configuration file: table_settings.yaml
Module-level table_settings.yaml files (or inlineTableSettings blocks inside
config/config.yaml) control how raw source tables are conformed and how
analytical data models are materialized in BigQuery. You use table
settings to configure enablement, materialization types, Dataform
tags, BigQuery labels, clustering, partitioning, custom filter
thresholds, declarative data quality assertions, and row- and column-level
security.
Nested configuration blocks—including foundation target, partitionDetails,
clusterDetails, bigQueryLabels, assertions, security, and
CatalogTableSettings—reject unknown keys. Data product table entries
(ProductTableItem) accept custom extra keys except disallowed keys such as
removeIsDeleted or remove_is_deleted (on Salesforce products) and misplaced
or misspelled security keys.
Dynamic dependency resolution
By default, Cortex Framework optimizes deployment footprint and
execution time by compiling and deploying only the foundation tables required by
your enabled data products. If a table configured in a foundation
table_settings.yaml doesn't have any active downstream data product depending
on it, the builder omits that table from deployment.
To override this optimization and always deploy a foundation table, set
deployAlways: true on the entry (see the
SAP ERP and
Salesforce parameter references).
Configuration paths and inline overrides
Each foundation or product module resolves table settings using one of three mutually exclusive mechanisms:
- External custom file (
tableSettings, recommended): Copy the module'stable_settings.default.yamlinto yourconfig/directory, customize it, and settableSettingsinconfig/config.yamlto the path relative toconfig/config.yaml:- Foundation modules:
cortex/sap/foundations/sap/table_settings.yaml(stored on disk atconfig/cortex/sap/foundations/sap/table_settings.yaml) orcortex/sfdc/foundations/sfdc/table_settings.yaml. - Product modules:
cortex/sap/products/accounting_documents/table_settings.yamlorcortex/sfdc/products/opportunities/table_settings.yaml.
- Foundation modules:
- Inline configuration (
inlineTableSettings): Embed table settings directly on the module entry inconfig/config.yamlfor compact overrides without maintaining a separate YAML file. You can't set bothtableSettingsandinlineTableSettingson the same module. - Default module fallback: When neither
tableSettingsnorinlineTableSettingsis specified, Cortex Framework loadstable_settings.default.yamlfrom the module's physical directory under the registered namespace (for example,../src/data_modules/cortex/sap/foundations/sap/table_settings.default.yaml).
- Data foundation modules (
foundations): SpecifyingtableSettingsorinlineTableSettingsreplacestable_settings.default.yamlwholesale for that module instance rather than merging with it. When customizing a shared foundation module (such aserporsfdc), keep all foundation tables required by your enabled downstream data products in your custom settings, or isolate custom tables in a separate foundation instance. - Data product modules (
products): SpecifyingtableSettingsorinlineTableSettingsmerges your explicit per-table field overrides on top of the module'stable_settings.default.yaml. You only need to list the tables and fields you want to customize (for example, changingmaterializationType,partitionDetails,filters, orassertionson a single table leaves all other default tables and fields intact).
Configuration styles
table_settings.yaml uses two schema styles depending on the module category:
- Data foundation style: List-based mapping that defines source-to-target
table relationships, change data capture (CDC) handling, and
BigQuery storage layout:
- SAP ERP (
cortex.sap.foundations.sap): Groups table lists under versioned root keys (ecc,s4, andcommon). - Salesforce (
cortex.sfdc.foundations.sfdc): Uses a flat root-level YAML list (SfdcFoundationTableSettings) without versioned root keys.
- SAP ERP (
- Data product style: Map-based dictionary that defines how analytical
tables or views materialize (
incremental,table, orview) and optimize storage:- Versioned products (
VersionedProductTableSettings/SapProductTableSettings): Groups asset maps undercommonand variant-specific root keys—for SAP ERP (SapProductTableSettings),eccapplies to SAP ECC,s4applies to SAP S/4HANA, andcommonapplies to both dialects. - Flat products (
FlatProductTableSettingsandSfdcProductTableSettings): Maps each target asset name directly at the root of the YAML file withoutecc,s4, orcommonwrappers. This format applies toflat_productmodules (such as SAP BDC and custom products) andsfdc_productmodules;sap_bdc_productandgeneric_productare deprecated legacy aliases offlat_product(see Deprecations).
- Versioned products (
Data foundation style for SAP ERP
In an SAP ERP foundation module (cortex.sap.foundations.sap),
table_settings.yaml organizes list entries under ecc, s4, and common.
Each item maps a raw source table to a conformed target table and configures
its BigQuery layout.
YAML syntax example
common:
- source:
tableName: raw_custom_bkpf
sapTableName: bkpf
isCdc: true
target:
tableName: bkpf # Optional: defaults to source.sapTableName (or source.tableName)
bigQueryLabels:
- key: data_class
value: transactional
- key: line_of_business
value: finance
dataformTags: [sap, common, finance, hourly]
clusterDetails:
columns: [bukrs, gjahr]
partitionDetails:
column: budat
partitionType: time
dataType: DATE
timeGrain: day
deployAlways: false
Parameter reference
| Parameter | Type | Required | Default / Example | Description |
|---|---|---|---|---|
ecc | s4 | common |
array[object] |
No | [] |
Lists of foundation table entries scoped to SAP ECC (ecc), SAP S/4HANA (s4), or both dialects (common). |
[].source |
object |
Yes | None | Describes the raw inbound table in dataSourceId (for example, sap_raw). See Source settings. |
[].target |
object |
No | {} |
Describes the conformed target table in dataTargetId (for example, sap_foundation). If omitted, target defaults derive from source. See Target settings. |
[].deployAlways |
boolean |
No | false |
When true, always builds and deploys the foundation table even if no enabled data product depends on it. See Dynamic dependency resolution. |
[].assertions |
map |
No | None | Optional declarative data quality assertions (standardRules and customRules) evaluated against the conformed foundation table. Also accepted under target.assertions; don't specify both on the same entry (if both are set, target.assertions takes precedence). See Data quality assertions. |
Source settings
Defines the raw inbound SAP table characteristics:
| Parameter | Type | Required | Default / Example | Description |
|---|---|---|---|---|
tableName |
string |
Yes | None | Physical name of the raw source table in BigQuery (case-insensitive) as replicated from SAP. |
sapTableName |
string |
No | Same as tableName |
Canonical SAP dictionary table name (case-insensitive) used for DD03L metadata lookup and default target table naming when source.tableName has a connector prefix. |
isCdc |
boolean |
No | true |
Controls CDC reconstruction versus full-snapshot processing:
|
keys |
array[string] |
No | None | Optional primary-key column list overriding SAP DD03L key discovery when reconstructing CDC records or generating unique_key assertions (for example, on custom raw views without dictionary key entries). |
Target settings
Defines the output conformed table layout in the target dataset:
| Parameter | Type | Required | Default / Example | Description |
|---|---|---|---|---|
tableName |
string |
No | Same as source.sapTableName or source.tableName |
Name of the conformed foundation table created in dataTargetId. Defaults to source.sapTableName when set, or source.tableName otherwise. |
dataformTags |
array[string] |
No | [] (for example, [sap, finance]) |
Arbitrary metadata tags attached to the Dataform action for selective pipeline runs (such as dataform run --tags ...). |
bigQueryLabels |
array[map] |
No | [] |
List of key and value pairs applied as BigQuery labels on the target table (for example, key: data_class, value: transactional). Keys must match ^[a-z][a-z0-9_-]{0,62}$ and values must match ^[a-z0-9_-]{0,63}$; uppercase letters, invalid characters, or values longer than 63 characters fail schema validation. Deterministic lowercasing and 54-character prefix plus _ and 8-character SHA-256 hex digest truncation apply only to framework-generated module labels. |
clusterDetails |
map |
No | None | Optional BigQuery clustering configuration. See Clustering details. |
partitionDetails |
map |
No | None | Optional BigQuery partitioning configuration. See Partitioning details. |
assertions |
map |
No | None | Optional declarative data quality assertions nested under target (recommended over entry-level [].assertions; don't specify both on the same entry—if both are set, target.assertions takes precedence). See Data quality assertions. |
security |
map |
No | None | Optional table-level column policy tags and row access policies (TableSecurityConfig). Must be nested under target.security; placing security (or child keys such as columnTags or rowAccessPolicies) at the table entry root or under source fails validation. See Row- and column-level security. |
Data foundation style for Salesforce
In a Salesforce data foundation module (cortex.sfdc.foundations.sfdc),
table_settings.yaml is structured as a flat root-level YAML list
(SfdcFoundationTableSettings). Each list entry maps a PascalCase raw
Salesforce SObject table to a snake_case conformed table in
BigQuery.
YAML syntax example
- source:
tableName: Account
isCdc: true
keys:
- Id
target:
tableName: account # Optional: defaults to snake_case of sfdcTableName or tableName
bigQueryLabels:
- key: data_class
value: master_data
- key: line_of_business
value: sales
dataformTags: [salesforce, sales, sales_cloud, foundation, masterdata, daily]
clusterDetails:
columns: [Id, AccountNumber]
deployAlways: false
- source:
tableName: CurrencyType
isCdc: false
target:
tableName: currency_type
dataformTags: [salesforce, sales, sales_cloud, foundation, masterdata, daily]
clusterDetails:
columns: [Id, IsoCode]
Parameter reference
| Parameter | Type | Required | Default / Example | Description |
|---|---|---|---|---|
[].source |
object |
Yes | None | Describes the replicated SObject table in the raw Salesforce BigQuery dataset (for example, sfdc_raw). |
[].target |
object |
No | {} |
Describes the conformed target table in the Salesforce foundation dataset (for example, sfdc_foundation). |
[].assertions |
map |
No | None | Optional declarative Dataform assertion overrides (also accepted under target.assertions; don't specify both on the same entry—if both are set, target.assertions takes precedence). |
[].deployAlways |
boolean |
No | false |
When true, deploys and builds the foundation table even when no enabled data product depends on it. |
Source settings
| Parameter | Type | Required | Default / Example | Description |
|---|---|---|---|---|
tableName |
string |
Yes | None (for example, Account) |
Physical name of the raw Salesforce table in BigQuery as created by BigQuery Data Transfer Service or your replication connector. |
sfdcTableName |
string |
No | Same as tableName |
Canonical Salesforce SObject API name (such as OpportunityLineItem) when the raw BigQuery table uses a custom prefix or alias. Used for annotation lookup and default target naming. |
keys |
array[string] |
No | ['Id'] |
Primary-key columns on the raw SObject table used for deduplication and uniqueness assertions. |
isCdc |
boolean |
No | true |
Controls incremental versus full-refresh processing:
|
Target settings
| Parameter | Type | Required | Default / Example | Description |
|---|---|---|---|---|
tableName |
string |
No | snake_case of source |
Name of the conformed foundation table in BigQuery. When omitted, Cortex Framework converts sfdcTableName (or source.tableName) from PascalCase to snake_case (for example, OpportunityHistory becomes opportunity_history). |
dataformTags |
array[string] |
No | ["sfdc", "foundation"] (for example, [salesforce, foundation, daily]) |
Metadata tags attached to the Dataform action for selective tag-based execution. Defaults to ["sfdc", "foundation"] when omitted or empty. |
bigQueryLabels |
array[map] |
No | [] |
Key-value pairs applied as BigQuery table labels. Keys must match ^[a-z][a-z0-9_-]{0,62}$ and values must match ^[a-z0-9_-]{0,63}$; uppercase letters, invalid characters, or values longer than 63 characters fail schema validation. Deterministic lowercasing and 54-character prefix plus _ and 8-character SHA-256 hex digest truncation apply only to framework-generated module labels. |
clusterDetails |
map |
No | None | Optional BigQuery clustering configuration using PascalCase Salesforce column names (such as Id). See Clustering details. |
partitionDetails |
map |
No | None | Optional BigQuery partitioning configuration using PascalCase Salesforce column names (such as SystemModstamp or CreatedDate). See Partitioning details. |
assertions |
map |
No | None | Optional declarative data quality assertions nested under target (recommended over entry-level [].assertions; don't specify both on the same entry—if both are set, target.assertions takes precedence). See Data quality assertions. |
security |
map |
No | None | Optional table-level column policy tags and row access policies (TableSecurityConfig). Must be nested under target.security; placing security (or child keys such as columnTags or rowAccessPolicies) at the table entry root or under source fails validation. See Row- and column-level security. |
Custom Salesforce fields (*__c) on configured SObjects require no column list
in table_settings.yaml: uv run cortex-build inspects raw
BigQuery table schemas and projects all standard and *__c
columns automatically (with onSchemaChange: "EXTEND" when isCdc: true).
table_settings.yaml configures only BigQuery physical layout,
tags, labels, scalar or list filters, assertions, and security—not column
selection, custom SObject join lists, or dynamic SQL logic. To onboard a custom
Salesforce SObject table (for example, My_Custom_Object__c, which conforms to
my_custom_object__c unless target.tableName is set), add an entry to the
root YAML list with deployAlways: true (or isolate custom SObjects in a
separate foundation instance), and
project custom *__c fields or custom SObject joins (such as polymorphic
WhatId targets beyond the 'CustomObject' prefix classification in
activities) in a custom or extended data product SQL definition.
Data product style
In a data product module, table_settings.yaml maps each target analytical
table or view key (matching the definition file stem, case-insensitive) to a
ProductTableItem configuration block that controls materialization,
enablement, published table name, tags, labels, filters, assertions, security,
and storage layout:
- Versioned products (
VersionedProductTableSettings/SapProductTableSettings): Nest target asset maps undercommonand variant-specific root keys (eccands4for SAP ERP products usingSapProductTableSettings). - Flat products (
FlatProductTableSettingsandSfdcProductTableSettings): Place target asset maps directly at the root of the file forflat_productmodules (such as SAP BDC and custom products) andsfdc_productmodules (sap_bdc_productandgeneric_productare deprecated legacy aliases offlat_product). Including version section wrappers (such ascommon,ecc, ors4) in flat product settings raises a validation error duringuv run cortex-build.
YAML syntax example (SAP ERP)
common:
currency_conversion:
materializationType: table
bigQueryLabels:
- key: data_class
value: transactional
- key: line_of_business
value: finance
dataformTags: [sap, dataproduct, common]
enabled: true
retentionDays: 365 # Custom parameter passed to Dataform context
s4:
customers:
materializationType: incremental
bigQueryLabels:
- key: data_class
value: master
dataformTags: [sap, dataproduct, masterdata]
enabled: true
clusterDetails:
columns: [mandt, ktokd]
partitionDetails:
column: erdat
partitionType: time
dataType: DATE
timeGrain: day
YAML syntax example (Salesforce)
opportunity_pipeline:
enabled: true
materializationType: incremental
partitionDetails:
column: opportunity_created_date
partitionType: time
dataType: DATE
timeGrain: MONTH
clusterDetails:
columns: [is_opportunity_closed, forecast_category_name, opportunity_owner_id]
bigQueryLabels:
- key: line_of_business
value: sales
- key: data_class
value: reporting
dataformTags: [salesforce, sales, sales_cloud, consumption_product, reporting, daily]
filters:
decision_maker_roles:
- Decision Maker
- Economic Buyer
- Executive Sponsor
- Economic Decision Maker
single_threaded_contact_threshold: 1
stalled_opportunity_days_threshold: 14
opportunity_pipeline_overview:
enabled: true
materializationType: table
partitionDetails:
column: opportunity_created_date
partitionType: time
dataType: DATE
timeGrain: MONTH
clusterDetails:
columns: [opportunity_type, account_industry, primary_product_family]
bigQueryLabels:
- key: line_of_business
value: sales
- key: data_class
value: reporting
dataformTags: [salesforce, sales, sales_cloud, consumption_product, reporting, daily]
Parameter reference
| Parameter | Type | Required | Default / Example | Description |
|---|---|---|---|---|
ecc | s4 | common |
map |
No | {} |
Versioned data products only (SapProductTableSettings / VersionedProductTableSettings). Maps dialect-agnostic assets under common and dialect-specific assets under variant keys such as ecc or s4. |
[table_name] |
map |
No | {} |
ProductTableItem descriptor configuring a target analytical asset (at root level for FlatProductTableSettings and SfdcProductTableSettings, or under ecc, s4, or common for SapProductTableSettings). |
[table_name].tableName |
string |
No | Same as YAML entry key | Optional published BigQuery table or view name override (valid identifier: letters, digits, and underscores). Lets you key settings by a snake_case definition stem while publishing a differently cased asset name (for example, PascalCase views in cortex_v6_compatibility). Distinct enabled entries can't resolve to the same tableName. |
[table_name].enabled |
boolean |
No | true |
Controls whether the analytical table or view is compiled into the Dataform workspace:
|
[table_name].materializationType |
string |
No | incremental (schema default; module defaults vary in table_settings.default.yaml) |
Controls how the analytical asset materializes in BigQuery:
|
[table_name].dataformTags |
array[string] |
No | [] (for example, [sap, dataproduct]) |
Arbitrary unique metadata tags attached to the analytical asset in Dataform for selective pipeline runs (such as dataform run --tags ...). |
[table_name].bigQueryLabels |
array[map] |
No | [] |
Unique key-value pairs applied as BigQuery labels on the target analytical asset (for example, key: data_class, value: master). Keys must match ^[a-z][a-z0-9_-]{0,62}$ and values must match ^[a-z0-9_-]{0,63}$; uppercase letters, invalid characters, or values longer than 63 characters fail schema validation. Deterministic lowercasing and 54-character prefix plus _ and 8-character SHA-256 hex digest truncation apply only to framework-generated module labels and pass-through bigquery.labels maps. |
[table_name].bigquery |
map[string, any] |
No | None | Optional pass-through BigQuery options object forwarded to the Dataform action's bigquery configuration block (for example, additional table options or labels merged with bigQueryLabels). For view assets, only bigquery.labels is emitted. |
[table_name].clusterDetails |
map |
No | None | Optional BigQuery clustering configuration (not applicable when materializationType is view). See Clustering details. |
[table_name].partitionDetails |
map |
No | None | Optional BigQuery partitioning configuration (not applicable when materializationType is view). See Partitioning details. |
[table_name].filters |
map[string, any] |
No | None | Structured business-rule thresholds and value lists passed to data product definitions that consume tableConfig.filters (such as SLA thresholds, stalled-deal day counts, and decision-maker role lists on prebuilt Salesforce consumption data products, or weather-risk thresholds on solution samples). Omitted from tableConfig when unset. |
[table_name].assertions |
map |
No | None | Optional declarative data quality assertions (standardRules and customRules) evaluated against the data product asset. See Data quality assertions. |
[table_name].security |
map |
No | None | Optional table-level column policy tags and row access policies (TableSecurityConfig) for materialized tables (table or incremental; rejected on view models). Must be placed at the table item root; nesting security under target fails validation. See Row- and column-level security. |
Unlike the data foundation style, the data product style accepts arbitrary
custom parameters on each table entry (ProductTableItem), except disallowed
keys such as removeIsDeleted or remove_is_deleted on Salesforce products
and misplaced or misspelled security keys (such as target.security,
root-level columnTags, or typos such as secruty). Nested sub-blocks
(partitionDetails, clusterDetails, bigQueryLabels, assertions, and
security) reject unknown keys. Extra parameters on a product table entry are
injected into the const tableConfig = ... object inside that table's compiled
Dataform definition file (replacing the // ___TABLE_CONFIG___
placeholder) rather than written to includes/config.js.
Data quality assertions
Both data foundation ([].assertions or target.assertions) and data product
([table_name].assertions) table settings accept an optional assertions map
(TableAssertionsConfig) to generate Dataform assertion views in
data.defaultAssertionDataset:
enabled(boolean, defaulttrue): Enables or disables assertions for the table while keeping static rule authoring checks active at build time.lookbackDays(integer >= 1, optional): Default partition-pruning window in days for standard rules on the table that setprunePartition: true.standardRules(array[map], optional): Built-in rule definitions supportingnon_null,unique_key,range,foreign_key,accepted_values, andcross_layer_parity(with optionalsap_currency_decimal_shift). Note thatcross_layer_parityrules don't allowblocking: trueorprunePartition: true.customRules(array[map], optional): Custom SQL assertions defined inline withsqlExpressionor through reusable SQL templates (templateFileandparams), plus optional custom Dataformtags(array[string]).
Every rule supports enabled (boolean, default true), blocking
(boolean, default false, except on cross_layer_parity), and severity
(when data.assertionSeverities is configured). On SAP CDC foundation tables,
rules with blocking: true are also enforced inside the BigQuery
BEGIN TRANSACTION ... MERGE ... COMMIT TRANSACTION block, rolling back the
merge if a check fails. For complete rule schemas, SAP functional templates, and
validation workflows, see
Data quality assertions.
Row- and column-level security
Both data foundation (target.security) and materialized data product
([table_name].security) table settings accept an optional security map
(TableSecurityConfig) for Tier 3 table-level column policy tag and row access
policy overrides. Placement is strictly validated—foundation entries reject
root-level or source.security blocks, product entries reject target.security
blocks, and view-materialized product models reject explicit security
blocks:
enabled(boolean, defaulttrue): Enables or opts the table out of overridable security policies. Settingenabled: falsetriggers Day-2 teardown of row access policies and Cortex Framework-managed column policy tags, and fails validation if any non-overridable (allowTableOverride: false) Tier 2 rule applies to the table.columnTags(map[string, map], optional): Maps unique (case-insensitive) BigQuery column names to{ policyTag: <alias | uri | null> }. Specify an alias fromdata.security.policyTagsor a full Data Catalog policy tag URI to attach or replace a tag, or explicitnullto clear an overridable Tier 2 policy tag (blank strings fail validation).rowAccessPolicies(array[map], optional): Table-level BigQuery row access policies. Each entry defines a uniquename(can't becortex_pipeline_sa_bypass), optionalenabled(boolean, defaulttrue), optionalinheritDomainFilter(boolean, defaulttrue), and—when enabled—non-emptygrantees(array[string]) andfilterPredicate(string, supporting non-self-referencing${ref(...)}lookup-table tokens).
For precedence rules, ${ref(...)} lookup syntax, pipeline service account
bypass behavior, and reconciliation workflows, see
Row- and column-level security.
Advanced BigQuery settings
Both foundation and data product table settings share the same structure for optimizing BigQuery storage and query performance through clustering and partitioning.
Clustering details
Clustering co-locates data within storage blocks based on up to four columns,
accelerating queries that filter (WHERE) or join (JOIN) on those keys:
clusterDetails:
columns: [bukrs, gjahr]
Parameter reference
| Parameter | Type | Required | Example | Description |
|---|---|---|---|---|
columns |
array[string] |
Yes | [bukrs, gjahr] |
Ordered list of zero to four unique column names (case-insensitive duplicate check; letters, digits, and underscores only). Pass an empty list ([]) to disable clustering when overriding a default. Column order determines the sort hierarchy. On data foundations, when the raw source table schema is available, build-time validation rejects unclusterable BigQuery types (FLOAT64, FLOAT, BYTES, JSON, TIME, INTERVAL, STRUCT, RECORD, and ARRAY) and warns on missing columns. On data products, only syntactic validation (at most four unique valid column identifiers) runs at build time, and BigQuery validates column types when queries run. |
Partitioning details
Partitioning divides a large table into physical segments based on a DATE,
DATETIME, TIMESTAMP, or INT64 column so queries scan only matching
partitions:
partitionDetails:
column: budat
partitionType: time
dataType: DATE
timeGrain: day
Parameter reference
| Parameter | Type | Required | Example | Description |
|---|---|---|---|---|
column |
string |
Yes | budat |
Column name used to partition the table (letters, digits, and underscores only). Must match a column of the corresponding data type on the table. |
partitionType |
string |
Yes | time |
Partitioning strategy:
Legacy values |
dataType |
string |
Conditional | DATE |
Physical BigQuery column type for partitionType: time (forbidden when partitionType is integer). Allowed values are DATE, DATETIME, and TIMESTAMP. Required on time-partitioned data products (omitting dataType on a product emits a deprecation warning and leaves the table unpartitioned until version 8.0); optional on data foundations, where the type is inferred from the raw source table schema when available. |
timeGrain |
string |
No | day |
Optional time granularity when partitionType is time (defaults to day; forbidden when partitionType is integer). Allowed values are hour, day, month, and year (case-insensitive). DATE columns support only day, month, and year; hour applies only to DATETIME and TIMESTAMP columns. |
rangeStart |
integer |
Conditional | 1 |
Required when partitionType is integer (forbidden for time). Inclusive start value of the first range partition. |
rangeEnd |
integer |
Conditional | 1000 |
Required when partitionType is integer. Exclusive end value of the last range partition (must be strictly greater than rangeStart). |
rangeInterval |
integer |
Conditional | 10 |
Required when partitionType is integer. Positive width of each integer partition bucket (> 0). |
Examples
The following examples show complete table_settings.yaml configurations for
SAP ERP data foundation and data product modules.
Foundation table settings example
This example configures an SAP foundation layer with clustered and partitioned
transactional tables (acdoca, bkpf, ekpo) alongside a vendor master table
(lfa1):
# ==============================================================================
# S/4HANA-Specific Tables
# ==============================================================================
s4:
- source:
tableName: acdoca
target:
bigQueryLabels:
- key: data_class
value: transactional
dataformTags: [sap, s4, finance, transactional, hourly]
clusterDetails:
columns: [rclnt, rbukrs, gjahr]
# ==============================================================================
# ECC-Specific Tables
# ==============================================================================
ecc:
- source:
tableName: faglflexa
target:
bigQueryLabels:
- key: data_class
value: transactional
dataformTags: [sap, ecc, finance, transactional, hourly]
# ==============================================================================
# Common Tables (ECC & S/4HANA)
# ==============================================================================
common:
# Financial document header (partitioned by posting date)
- source:
tableName: bkpf
isCdc: true
target:
bigQueryLabels:
- key: data_class
value: transactional
dataformTags: [sap, common, finance, hourly]
clusterDetails:
columns: [bukrs, gjahr]
partitionDetails:
column: budat
partitionType: time
dataType: DATE
timeGrain: day
# Purchasing document items (partitioned by change date)
- source:
tableName: ekpo
target:
bigQueryLabels:
- key: data_class
value: transactional
dataformTags: [sap, common, logistics, purchasing, hourly]
clusterDetails:
columns: [mandt, ebeln]
partitionDetails:
column: aedat
partitionType: time
dataType: DATE
timeGrain: month
# Vendor master data table
- source:
tableName: lfa1
target:
bigQueryLabels:
- key: data_class
value: master
dataformTags: [sap, common, masterdata, vendor, daily]
Data product table settings example
This example configures materialization strategies for analytical data product
assets—setting transactional sales_documents to incremental to reduce scan
costs, customers to table for full master-data refreshes, and
sales_performance_summary to view:
# Settings applied for both ECC and S/4HANA pipelines
common:
# Transactional data product - incremental build
sales_documents:
materializationType: incremental
bigQueryLabels:
- key: data_class
value: transactional
dataformTags: [sap, dataproduct, sales, transactional]
clusterDetails:
columns: [vkorg, vbeln]
partitionDetails:
column: audat
partitionType: time
dataType: DATE
timeGrain: day
# Master data product - full table rebuild
customers:
materializationType: table
bigQueryLabels:
- key: data_class
value: master
dataformTags: [sap, dataproduct, masterdata]
clusterDetails:
columns: [mandt, ktokd]
# Aggregated reporting asset - virtual SQL view
sales_performance_summary:
materializationType: view
bigQueryLabels:
- key: data_class
value: transactional
dataformTags: [sap, dataproduct, sales, reporting]
How-to guides
This section provides step-by-step instructions for customizing foundation table scope and deploying multiple foundation instances.
Customize foundation table scope
To add custom source tables or remove unused tables in an existing data foundation module without creating separate module instances:
- Copy the default
table_settings.default.yamlfile into yourconfig/directory—for example,config/cortex/sap/foundations/sap/custom_table_settings.yamlfor SAP ERP orconfig/cortex/sfdc/foundations/sfdc/custom_table_settings.yamlfor Salesforce. Add custom tables or remove unused entries (under
ecc,s4, orcommonfor SAP ERP, or in the flat root-level list for Salesforce). SetdeployAlways: trueif no enabled data product declares the custom table in itsmanifest.yaml:SAP ERP (
cortex.sap.foundations.sap):common: - source: tableName: CUSTOM_RAW_TABLE_NAME target: dataformTags: [custom_tag] deployAlways: trueReplace the following:
CUSTOM_RAW_TABLE_NAME: physical table name in your raw BigQuery SAP source dataset, for example:ztcustom.
Salesforce (
cortex.sfdc.foundations.sfdc):# Keep standard SObject entries required by enabled Salesforce data products, # and append custom SObjects (for example, My_Custom_Object__c): - source: tableName: CUSTOM_SOBJECT_NAME isCdc: true target: dataformTags: [salesforce, foundation, custom] clusterDetails: columns: [Id] deployAlways: trueReplace the following:
CUSTOM_SOBJECT_NAME: physical table name in your raw BigQuery Salesforce source dataset, for example:My_Custom_Object__c.
Reference your custom file in
config/config.yamlusing a path relative to theconfig/directory (or embed a compact override directly withinlineTableSettings):data: modules: foundations: - moduleId: erp modulePath: cortex.sap.foundations.sap dataSourceId: sap_raw dataTargetId: sap_foundation moduleSettings: sapVersion: s4 mandt: "100" tableSettings: "cortex/sap/foundations/sap/custom_table_settings.yaml"Optional: To enrich the conformed table with table and column descriptions, create an annotation YAML file under
src/data_modules/cortex/sap/foundations/sap/annotations/(orsrc/data_modules/cortex/sfdc/foundations/sfdc/annotations/for Salesforce, named insnake_case). For details on the annotation schema, see Data foundation module creation.
Deploy multiple foundation instances
You can deploy two or more separate instances of the same foundation module in
a single config/config.yaml file—for example, to ingest multiple SAP systems
or Salesforce orgs, segment custom tables, or target separate
BigQuery datasets.
Before you begin
- Verify that the raw source tables exist in each inbound BigQuery dataset.
- For SAP ERP foundation modules, verify that
DD03Lcontains column metadata for every table in scope (see SAP ERP integration). For Salesforce foundation modules, grant your build principalroles/bigquery.dataVieweron each raw dataset androles/bigquery.jobUseronbuildEnvironment.buildProjectIdsouv run cortex-buildcan inspect table schemas (see Salesforce integration).
Procedure
Register distinct target dataset entries under
data.datasetsinconfig/config.yaml:data: datasets: - id: sap_raw projectId: SOURCE_PROJECT_ID datasetId: cortex_sap_raw - id: data_foundation_core projectId: TARGET_PROJECT_ID datasetId: data_foundation_sap_core - id: data_foundation_custom projectId: TARGET_PROJECT_ID datasetId: data_foundation_sap_customReplace the following:
SOURCE_PROJECT_ID: Google Cloud project ID hosting the raw SAP dataset, for example:my-cortex-source-project.TARGET_PROJECT_ID: Google Cloud project ID hosting your conformed foundation datasets, for example:my-cortex-target-project.
Define each foundation instance under
data.modules.foundationswith its own uniquemoduleId,dataTargetId,moduleSettings, and optionaltableSettings:data: modules: foundations: # Core SAP ERP foundation module instance - moduleId: erp_core modulePath: cortex.sap.foundations.sap dataSourceId: sap_raw dataTargetId: data_foundation_core moduleSettings: sapVersion: s4 mandt: "100" # Custom SAP tables foundation module instance - moduleId: erp_custom modulePath: cortex.sap.foundations.sap dataSourceId: sap_raw dataTargetId: data_foundation_custom moduleSettings: sapVersion: s4 mandt: "100" tableSettings: "cortex/sap/foundations/sap/custom_datafoundation_table_settings.yaml"For curated
cortex.sap.*foundation and data product modules, tables remain multi-client and don't filter rows bymoduleSettings.mandt(mandtis forwarded tocortex_v6_compatibilitymodels andcortex-demo). Multiple foundation instances that share the samedataSourceIdprocess all SAP clients present in the raw tables regardless of their configuredmandtvalues.Create
config/cortex/sap/foundations/sap/custom_datafoundation_table_settings.yamlwith the custom table scope:common: - source: tableName: CUSTOM_SAP_TABLE_NAME target: dataformTags: [sap, s4, hourly] clusterDetails: columns: [carrid, connid] partitionDetails: column: fldate partitionType: time dataType: DATE timeGrain: day deployAlways: trueReplace the following:
CUSTOM_SAP_TABLE_NAME: raw SAP table name insap_raw, for example:sflight.
Optional: Add field-level metadata annotations under
src/data_modules/cortex/sap/foundations/sap/annotations/as described in Data foundation module creation.Build and deploy your workspace using
uv run cortex-build-and-deploy, then execute the generated Dataform actions as described in Post-deployment steps.
Validate configuration before deployment
Before synchronizing compiled pipelines to Dataform or Git across multi-project environments, verify your Identity and Access Management (IAM) permissions and run offline SQL compilation checks:
- Multi-project IAM permissions:
- Grant your build principal
roles/bigquery.jobUseronbuildEnvironment.buildProjectIdandroles/bigquery.dataVieweron each raw source dataset (dataSourceId). - Grant the target Dataform service account
roles/bigquery.dataVieweron raw source datasets androles/bigquery.dataEditoron all target foundation, data product, anddata.defaultAssertionDatasetdatasets, plusroles/bigquery.jobUseron the repository project.
- Grant your build principal
Local SQL graph compilation: Build and compile all enabled modules into an ephemeral workspace (connects to BigQuery when non-external foundations or catalogs are enabled), or pass
--dist-dir distafteruv run cortex-buildto compile strictly offline without BigQuery credentials:export CORTEX_CONFIG_FILE=config/config.yaml uv run cortex-compile --config $CORTEX_CONFIG_FILEFull local build: Build the
distpackage and automatically validate declarative assertion rules and templates against live source schemas before deploying:export CORTEX_CONFIG_FILE=config/config.yaml uv run cortex-build --config $CORTEX_CONFIG_FILE
What's next
- Deploy Cortex Framework
- Post-deployment steps
- Configure data quality assertions
- Configure row- and column-level security
- Configure conversational analytics data agents
- Extend Cortex Framework