Satyadeepak
Databricks Employee
Databricks Employee

 

To reference the HTTP Path using substitutions in Databricks Asset Bundles and job clusters, you can use the variables section in your databricks.yml configuration file

In your databricks.yml file, you can define a variable for the HTTP Path. For example:

 

bundle:
  name: my-databricks-bundle
  variables:
    http_path:
      description: "HTTP Path for the Databricks cluster"
      default: "your-http-path-here"

 

You can then reference this variable in other parts of your configuration file using the ${variables.<variable-name>} syntax. For example, if you need to use the HTTP Path in a job configuration, you can do it like this:

 

resources:
  jobs:
    my-job:
      name: "My Job"
      tasks:
        - task_key: my-task
          existing_cluster_id: "your-cluster-id"
          notebook_task:
            notebook_path: "/path/to/your/notebook"
            base_parameters:
              http_path: "${variables.http_path}"

When deploying the bundle, the variable ${variables.http_path} will be substituted with the value defined in the variables section.

https://docs.databricks.com/en/dev-tools/bundles/settings.html#variables

View solution in original post