Upgrade Cortex Framework

This guide explains the standard workflow for upgrading an existing Google Cloud Cortex Framework deployment to a target release, including repository updates, custom table_settings.yaml handling, targeted Dataform full refreshes, and post-upgrade verification.

Use this guide together with the version-specific upgrade guide for your target release, the Release notes, and Cortex Framework deprecations.

Version-specific upgrade guides

Target version Upgrading from Upgrade guide
7.1 7.0.x Upgrade to version 7.1

Step 1: Prepare and pull the target release

Validate the upgrade in a non-production Google Cloud project first. If your target release requires a full refresh on any incremental tables, confirm that your raw or data foundation tables still retain the historical records needed to rebuild them.

  • Forked repository: Fetch and merge the target release branch or tag into your fork, resolve any conflicts, and run uv sync in cortex-framework-core/.
  • Fresh clone: Clone the target release into a new directory, copy your config/config.yaml, custom table_settings.yaml files, and custom namespaces into it, and run uv sync in cortex-framework-core/.

Step 2: Update configuration, custom settings, and extensions

Apply the configuration, CLI, and custom extension updates in your target version-specific upgrade guide.

Custom table_settings.yaml behavior across upgrades

  • Data products (field-level merge): Keep only the tables and fields you explicitly override. Copied default keys freeze older release values across upgrades.
  • Data foundations (full replacement): Diff any custom foundation file against the target release's table_settings.default.yaml so you keep added tables and default assertions.

For full merge and validation rules, see Deployment configuration.

Step 3: Build, compile, and deploy

  1. Build the Dataform workspace and check for configuration or deprecation warnings:

    uv run cortex-build --config config/config.yaml
    
  2. Compile the generated workspace offline to catch SQL or JavaScript errors:

    uv run cortex-compile
    
  3. Deploy the compiled workspace to Dataform or Git:

    uv run cortex-deploy --config config/config.yaml
    

    Pass --create-datasets if the release introduces a new dataset, and pass -y (--yes) in CI/CD pipelines after reviewing planned file deletions.

Step 4: Run targeted full refreshes when required

Skip this step if your target version guide lists no tables requiring a full refresh. Incremental tables compile with onSchemaChange: "EXTEND", so columns renamed or removed in a new release fail with Removing column on EXTEND is not allowed until refreshed.

Run a targeted full refresh

Refresh only the affected actions listed in your target version guide:

  • Dataform console: Select the affected actions in your workspace and choose Run with full refresh.
  • Dataform CLI:

    dataform run --actions ACTION_NAME --full-refresh
  • Deployments with data.security enabled: Standard --full-refresh doesn't trigger a governed incremental reload on its own. Pass both --full-refresh and the cortex_full_refresh compilation variable (separate multiple table names with ;, or use true for a one-off reload of all governed incremental actions—don't persist true in scheduled workflows):

    dataform run --actions ACTION_NAME --full-refresh \
      --vars='cortex_full_refresh=TABLE_1;TABLE_2'

Step 5: Verify and clean up

  1. Run a normal incremental execution: Trigger a second (non-full-refresh) Dataform run and confirm all actions and unique_key assertions pass with stable row counts.
  2. Re-run optional post-deployment tools (if enabled): Run uv run cortex-apply-security --config config/config.yaml for data.security, and re-sync Knowledge Catalog, Conversational analytics, or Gemini integrations so published metadata and agents pick up schema updates.
  3. Validate consumers and drop orphaned tables: Verify downstream SQL, LookML, BI dashboards, and agents, then drop any confirmed orphaned BigQuery tables listed in your target version guide.

Upgrade policy

  • Patch releases (for example, 7.1.0 to 7.1.1): Pull the release and run Step 3 and Step 5.
  • Multi-hop minor upgrades (for example, 7.0 to 7.2): Pull the final target release once and apply each intermediate version guide in order before deploying.
  • Major releases (for example, 7.x to 8.0): Resolve all items in Cortex Framework deprecations scheduled for removal before upgrading.

What's next