FedeRaimondi
Contributor II

Hey @azam-io , you can define the variables in you databricks.yml file for each target (you can define several for each env).

bundle:
  name: your-name
  uuid: id

include:
  - resources/jobs/*.yml
  - resources/experiments/*.yml
  - resources/dashboards/*.yml
  - resources/clusters/*.yml

targets:
  dev:
    mode: development
    default: true
    workspace:
      host: "host-link-dev"
      root_path: "path"
    run_as:
      service_principal_name: spn
    variables:
      catalog: dev_catalog
      schema: dev_schema

  prod:
    mode: production
    workspace:
      host: "host-link-prd"
      root_path: "path"
    run_as:
      service_principal_name: spn
    variables:
      catalog: prd_catalog
      schema: prd_schema

variables:
  catalog:
    description: Catalog name.
    default: dev_catalog
  schema:
    description: Schema name.
    default: dev_schema

Then, in your pipelines or other resources yml simply refer to the variables with:

${var.catalog}