Cortex Framework extensibility guide
Google Cloud Cortex Framework provides data product accelerators for advanced analytics and AI. This documentation explains how to customize and extend Cortex Framework.
For proper isolation and lifecycle management, package custom foundation and data product modules within a custom namespace. This guide covers the following major areas of extensibility:
- Data foundation module creation: Register custom data modules to define custom compilation behaviors or ingest tables from source systems not supported out of the box (for example, PostgreSQL or MySQL databases).
- Data product module creation:
Create new analytical data products with custom logic using Dataform
JavaScript (
.js) definitions (recommended) or.sqlxfiles. - Agentic creation of data products: Use the packaged AI coding assistant skills to configure workspaces, onboard sources, inspect schemas, generate ER diagrams, scaffold and extend data products, run unit tests and validation gates, and deploy validated artifacts.
Extensibility architecture
Cortex Framework separates core build orchestration from source system and domain content across four explicit contract surfaces:
| Contract surface | Audience | Mechanism |
|---|---|---|
| Tier 1: Declarative YAML | Workspace and module authors (no Python required) | config.yaml, manifest.yaml, table_settings.yaml, table_settings.default.yaml, inlineTableSettings, and annotations/<table>.yaml. |
Tier 2: Model runtime JavaScript (includes/*.js) |
Dataform model authors | Vendor-neutral runtime helpers in includes/*.js (publisher.js, publish_config.js, incremental.js, assertion_helper.js, blocking_assertions.js, security_helper.js, sql_helper.js, label_helper.js, and date.js) plus build-injected moduleContext and tableConfig objects. |
Tier 3: Python Plugin SDK (common.sdk) |
Custom builder, schema, and metadata plugin authors | Single public Python import surface (from common.sdk import ...) backed by structural protocols, Pydantic v2 models, immutable ResolvedWorkspace nodes, root-anchored <namespace>/{builders,metadata,schemas}/ directories, and deterministic ModuleCatalog and BuilderResolver discovery. |
| Content-to-content data contract | Cross-module BigQuery dependencies | Declared upstream dependencies in manifest.yaml bound through dependencyBindings in config.yaml (ResolvedFoundationModule, ResolvedProductModule, or ResolvedCatalogBinding). |
Example scenarios
The following extensibility guides walk through practical end-to-end scenarios:
- Custom namespace setup: Package and isolate custom foundations, data
products, shared
includes/*.jshelpers, SQL assertion templates, and Python plugins inside a dedicated custom namespace (such asticketingorsap_bookingdatamodel). See Custom namespace setup for details. - Custom data foundation module: Walks through creating a custom PostgreSQL
ticketingfoundation (customers,tickets, andticketlogitemtables) in theticketingnamespace, including a PythonFoundationBuilderplugin built oncommon.sdk. See Data foundation module creation for details. - Custom data product modules: Walks through an SAP ERP versioned data
product (
flights_usdinsap_bookingdatamodelusingsap_product, joiningsflightwithtcurrto convert flight pricing into USD) and a cross-source composite data product usingflat_productthat combines SAP deliveries, Salesforce accounts, and Google WeatherNext forecasts from BigQuery sharing. See Data product module creation for details.