Prerequisites
This page guides you through the Google Cloud Cortex Framework deployment prerequisites. Complete each prerequisite before starting the Demo deployment or the Production deployment.
Installation artifacts
The first step is to download the Cortex Framework artifacts to your local development environment.
Windows environment setup
If you work on Linux, macOS, or Cloud Shell, skip to Clone the repository.
By default, Windows limits paths to 260 characters. Cloning the Cortex Framework repository, building local Dataform packages, or installing Node.js dependencies can create paths that exceed this limit.
Before you clone the repository or run a build, enable long path support:
Enable Win32 long paths: Run PowerShell as Administrator, then sign out of Windows and sign back in:
New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem" ` -Name "LongPathsEnabled" -Value 1 -PropertyType DWORD -ForceAlternatively, open
gpedit.msc, go to Computer Configuration > Administrative Templates > System > File System, enable Enable Win32 long paths, and then sign out and sign back in.Enable long paths in Git:
git config --global core.longpaths true
Optional: Windows Subsystem for Linux (WSL2)
If your team prefers a Linux toolchain, all Cortex Framework CLI
tools and
agent skills work
unchanged inside WSL2 (such as Ubuntu). Keep the cloned project on the Linux
file system (for example, ~/src/cortex), not under /mnt/c/..., for
acceptable performance. When you work inside WSL2 on the Linux file system, the
preceding Windows-specific steps don't apply.
Clone the repository
Clone the Cortex Framework repository from GitHub:
git clone https://github.com/GoogleCloudPlatform/cortex-framework
Change to the cloned repository directory:
cd cortex-framework
Install uv
uv is a fast Python package and environment
manager written in Rust. Cortex Framework uses uv to maintain
isolated, reproducible build and deployment environments.
Install uv by following the
uv installation instructions.
Synchronize required dependencies
Cortex Framework requires Python 3.13.
Synchronize Python dependencies and initialize the virtual environment (uv
automatically downloads a matching Python 3.13 runtime if one isn't installed
locally):
uv sync
Optional: Install Dataform CLI
Standard uv run cortex-build and uv run cortex-deploy runs require only
Python and uv. Install Node.js (npx) or the @dataform/cli binary in your
system PATH if you plan to do any of the following:
- Build, extend, or validate modules with the agentic data product builder
(agent skills),
which runs
uv run cortex-metadataanduv run cortex-compile. - Run offline Dataform compilation checks for modules and
data quality assertions
with
uv run cortex-compile. - Cache and inspect foundation or data product schemas locally with
uv run cortex-metadata.
Install @dataform/cli globally:
npm install -g @dataform/cli
Configure the Google Cloud CLI
gcloud auth login
gcloud auth application-default login
Prepare your Dataform project
Before running a deployment, verify that you have access to a Google Cloud project with an attached billing account.
Configure your gcloud CLI environment to use your Google Cloud project:
# Set current project and quota project
gcloud config set project PROJECT_ID
gcloud auth application-default set-quota-project PROJECT_ID
Replace the following:
PROJECT_ID: your Google Cloud project ID, for example:my-cortex-project.
Enable Google Cloud services
Enable the following core Google Cloud APIs in your deployment projects
(you can also pass --enable-apis to uv run cortex-build,
uv run cortex-deploy, uv run cortex-build-and-deploy,
uv run cortex-apply-security, uv run cortex-demo,
uv run cortex-create-kc-data-products, uv run cortex-create-ca-agents, or
uv run cortex-register-gemini-agents to enable required APIs automatically):
- BigQuery API (
bigquery.googleapis.com) - Dataform API (
dataform.googleapis.com) - Cloud Resource Manager API (
cloudresourcemanager.googleapis.com, used for BigLake Delta Sharing capacity validation and telemetry project-number lookups)
Optional integrations—such as demo sample loading, BigQuery sharing, BigLake Delta Sharing, row- and column-level security, Knowledge Catalog, conversational analytics, and Gemini—require additional APIs listed after the following command.
Enable these Google Cloud services in Cloud Shell or your local terminal:
gcloud config set project PROJECT_ID
gcloud services enable cloudresourcemanager.googleapis.com \
bigquery.googleapis.com \
dataform.googleapis.com \
--project=PROJECT_ID
# Optional: Enable APIs for demo sample loading (Cloud Storage), BigQuery sharing
# (Analytics Hub / Salesforce Data 360), BigLake Delta Sharing (SAP BDC),
# row- and column-level security (column policy tags), Knowledge Catalog,
# conversational analytics, and Gemini:
gcloud services enable storage.googleapis.com \
analyticshub.googleapis.com \
biglake.googleapis.com \
bigqueryreservation.googleapis.com \
datacatalog.googleapis.com \
bigquerydatapolicy.googleapis.com \
dataplex.googleapis.com \
geminidataanalytics.googleapis.com \
cloudaicompanion.googleapis.com \
discoveryengine.googleapis.com \
--project=PROJECT_ID
Replace the following:
PROJECT_ID: your Google Cloud project ID, for example:my-cortex-project.
Depending on which optional integrations or workflows you run, also enable the following APIs in the relevant Google Cloud projects:
- Demo deployment sample data loading (
uv run cortex-demo):storage.googleapis.comon your demo target project when loading sample raw data from Cloud Storage. See Demo deployment. - BigQuery sharing catalogs (
type: analytics_hub):analyticshub.googleapis.comandbigquery.googleapis.comon the project hosting your subscribed linked datasets (including Salesforce Data 360). See BigQuery sharing integration and Salesforce Data 360 integration. - BigLake Delta Sharing catalogs (
type: lakehouse_delta_share):biglake.googleapis.com,bigquery.googleapis.com,bigqueryreservation.googleapis.com, andcloudresourcemanager.googleapis.comon the catalog project. See SAP Business Data Cloud integration. - Row- and column-level security (column policy tags):
datacatalog.googleapis.com(Data Catalog API) on every project hosting a referenced policy tag taxonomy and on every target project hosting tables governed by column-level security (CLS). When configuring BigQuery data policies for optional dynamic data masking, also enablebigquerydatapolicy.googleapis.com(BigQuery Data Policy API) on both the taxonomy project and every CLS-governed target project. See Row- and column-level security. - Knowledge Catalog synchronization
(
uv run cortex-create-kc-data-products):dataplex.googleapis.comon the catalog or governance project (--kc-project-id, or each synced product's target project when omitted) andbigquery.googleapis.comon each synced product's target dataset project. Pass--enable-apisto enable missing APIs automatically. See Knowledge Catalog integration. - Conversational analytics data agents
(
uv run cortex-create-ca-agents):geminidataanalytics.googleapis.com,cloudaicompanion.googleapis.com, andbigquery.googleapis.com(for zero-cost golden-query dry runs) onbuildProjectId. See Conversational analytics integration. - Gemini agent registration
(
uv run cortex-register-gemini-agents):discoveryengine.googleapis.comandgeminidataanalytics.googleapis.comonbuildProjectId. See Gemini integration.
Troubleshooting
The following table describes common local setup issues on Windows and how to resolve them:
| Symptom | Cause | Resolution |
|---|---|---|
Filename too long, ENAMETOOLONG, or The system cannot find the path specified during git clone, npm install, or build |
Long path support isn't enabled on Windows or Git. | Complete Windows environment setup to enable Win32 and Git long paths, then sign out of Windows and sign back in. |
Running python3 opens the Microsoft Store |
Windows App Execution Alias intercepts python3 with a Microsoft Store placeholder. |
Use uv run python ..., or turn off the alias in Settings > Apps > Advanced app settings > App execution aliases. Avoid calling python3 or python directly on Windows. |
Next steps
Explore the following guides to build and deploy Cortex Framework:
- Demo deployment: Deploy sample data in minutes to see Cortex Framework in action.
- Production deployment: Configure and deploy Cortex Framework for your enterprise data.