CLI Cortex Framework demo deploy

uv run cortex-demo deploys a Google Cloud Cortex Framework demo environment with pre-populated sample SAP and Salesforce datasets in BigQuery and Dataform.

Synopsis

uv run cortex-demo [-h] [--project-id PROJECT_ID] \
    [--dataform-region DATAFORM_REGION] \
    [--bigquery-location BIGQUERY_LOCATION] \
    [--service-account SERVICE_ACCOUNT] \
    [--sources SOURCES] \
    [--sap-version SAP_VERSION] \
    [--source-sap-raw-dataset-id SOURCE_SAP_RAW_DATASET_ID] \
    [--target-sap-foundation-dataset-id TARGET_SAP_FOUNDATION_DATASET_ID] \
    [--source-sfdc-raw-dataset-id SOURCE_SFDC_RAW_DATASET_ID] \
    [--target-sfdc-foundation-dataset-id TARGET_SFDC_FOUNDATION_DATASET_ID] \
    [--target-dp-dataset-id TARGET_DP_DATASET_ID] \
    [--target-samples-dataset-id TARGET_SAMPLES_DATASET_ID] \
    [--repository-name REPOSITORY_NAME] \
    [--workspace-name WORKSPACE_NAME] \
    [--create-workflow-configs] \
    [--enable-apis] [--create-datasets] [--disable-telemetry]

Replace the following:

  • PROJECT_ID: target Google Cloud project ID, for example: my-cortex-demo-project.
  • DATAFORM_REGION: Google Cloud region for the Dataform repository, for example: us-central1.
  • BIGQUERY_LOCATION: BigQuery dataset location, for example: US.
  • SERVICE_ACCOUNT: service account email for Dataform workflow execution, for example: cortex-dataform@example.com.
  • SOURCES: source systems to deploy (sap, sfdc, or all), for example: all.
  • SAP_VERSION: SAP source system version (s4 or ecc, case-insensitive), for example: s4.
  • SOURCE_SAP_RAW_DATASET_ID: raw SAP BigQuery dataset ID, for example: cortex_demo_sap_s4_raw.
  • TARGET_SAP_FOUNDATION_DATASET_ID: SAP foundation BigQuery dataset ID, for example: cortex_demo_sap_s4_data_foundation.
  • SOURCE_SFDC_RAW_DATASET_ID: raw Salesforce BigQuery dataset ID, for example: cortex_demo_sfdc_raw.
  • TARGET_SFDC_FOUNDATION_DATASET_ID: Salesforce foundation BigQuery dataset ID, for example: cortex_demo_sfdc_data_foundation.
  • TARGET_DP_DATASET_ID: data product BigQuery dataset ID, for example: cortex_demo_data_product.
  • TARGET_SAMPLES_DATASET_ID: SAP solution samples BigQuery dataset ID, for example: cortex_demo_samples.
  • REPOSITORY_NAME: Dataform repository name, for example: cortex-framework-demo.
  • WORKSPACE_NAME: Dataform workspace name, for example: demo.

Options

The following table describes the command-line options for uv run cortex-demo:

Flag Description Default
-h, --help Show help message and exit. None
--project-id PROJECT_ID The Google Cloud project ID to use for this invocation. Falls back to the PROJECT_ID environment variable if set. $PROJECT_ID
--dataform-region DATAFORM_REGION The Google Cloud region where the Dataform repository and workspace are hosted. For more information, see Dataform locations. us-central1
--bigquery-location BIGQUERY_LOCATION The BigQuery location to use for all datasets. BigQuery is the native execution environment for all transformations. For more information, see BigQuery locations. US
--service-account SERVICE_ACCOUNT The service account Dataform uses to run the transformation graphs. Can be passed standalone to configure the service account on the generated Dataform target, and is required when --create-workflow-configs is set. None
--sources SOURCES Source systems to seed and deploy in the demo environment (case-insensitive). Allowed values are sap (deploys SAP raw, foundation, data products, and solution samples), sfdc (deploys Salesforce raw, foundation, and data products), or all (deploys both SAP and Salesforce demo datasets and modules). all
--sap-version SAP_VERSION The SAP source system version (ecc or s4, case-insensitive) to use when --sources includes SAP. s4
--source-sap-raw-dataset-id SOURCE_SAP_RAW_DATASET_ID The BigQuery dataset ID containing the raw SAP tables. cortex_demosap<sap_version>_raw (s4 or ecc)
--target-sap-foundation-dataset-id TARGET_SAP_FOUNDATION_DATASET_ID The BigQuery dataset ID for the SAP Data Foundation layer. cortex_demosap<sap_version>_data_foundation (s4 or ecc)
--source-sfdc-raw-dataset-id SOURCE_SFDC_RAW_DATASET_ID The BigQuery dataset ID containing the sample raw Salesforce SObject tables. cortex_demo_sfdc_raw
--target-sfdc-foundation-dataset-id TARGET_SFDC_FOUNDATION_DATASET_ID The BigQuery dataset ID for the Salesforce Data Foundation layer. cortex_demo_sfdc_data_foundation
--target-dp-dataset-id TARGET_DP_DATASET_ID The BigQuery dataset ID for the Data Product Layer (domain-oriented interfaces aggregated for consumption). cortex_demo_data_product
--target-samples-dataset-id TARGET_SAMPLES_DATASET_ID The BigQuery dataset ID for the target samples. cortex_demo_samples
--repository-name REPOSITORY_NAME The name of the Dataform repository to create or deploy the assets to. cortex-framework-demo
--workspace-name WORKSPACE_NAME The name of the Dataform workspace where the assets are pushed. demo
--create-workflow-configs Optional flag to commit and push the workspace, create one release configuration (<repository_name>-release), create five scheduled Dataform workflow configurations (<repository_name>-hourly, <repository_name>-daily, <repository_name>-weekly, <repository_name>-monthly, and <repository_name>-yearly, tagged hourly, daily, weekly, monthly, and yearly in UTC), and trigger an immediate workflow run. Requires --service-account. false
--enable-apis Optional flag to automatically enable the required Google Cloud APIs for the project without prompting, including BigQuery (bigquery.googleapis.com), Dataform (dataform.googleapis.com), and Cloud Storage (storage.googleapis.com). false
--create-datasets Optional flag to automatically provision missing BigQuery datasets without prompting: raw source datasets, data foundation datasets, the data product dataset, cortex_demo_samples (or --target-samples-dataset-id, when SAP is enabled), and dataform_assertions. false
--disable-telemetry Temporarily disable telemetry event logging during execution. For more information, see Cortex Framework telemetry. false

Examples

Deploy the default SAP S/4HANA and Salesforce demo datasets and pipelines:

export PROJECT_ID=PROJECT_ID

uv run cortex-demo --project-id=$PROJECT_ID --sap-version s4

Replace the following:

  • PROJECT_ID: target Google Cloud project ID, for example: my-cortex-demo-project.

Deploy only Salesforce sample datasets and data products:

export PROJECT_ID=PROJECT_ID

uv run cortex-demo --project-id=$PROJECT_ID --sources sfdc

Replace the following:

  • PROJECT_ID: target Google Cloud project ID, for example: my-cortex-demo-project.

What's next