Skip to content

[Bug]: Project variables are not resolved when referenced in Environment file paths #8187

Description

@dsanderbi

Apache Hop version?

2.19.0

Java version?

21

Operating system

macOS

What happened?

When using Apache Hop project variables to shorten and centralize file paths, the variables are correctly resolved when configuring Environment Settings files through the UI. However, the same variables are not resolved when the workflow or pipeline is executed.

For example, the project configuration defines variables such as:

{
  "metadataBaseFolder" : "${PROJECT_HOME}/metadata",
  "unitTestsBasePath" : "${PROJECT_HOME}",
  "dataSetsCsvFolder" : "${PROJECT_HOME}/datasets",
  "enforcingExecutionInHome" : true,
  "autoExportMetadataFilename" : "metadata.json",
  "parentProjectName" : "default",
  "config" : {
    "variables" : [ {
      "name" : "CONFIG_HOME",
      "value" : "${PROJECT_HOME}/config"
    } ]
  }
}

When selecting a file through the Browse functionality in the Environment Settings, Apache Hop uses the project variable name to reference the selected file instead of ${PROJECT_HOME}/config

Image

When the workflow or pipeline is started, Apache Hop fails to resolve ${CONFIG_HOME} and therefore cannot find the referenced file to load its variables.
You need to use ${PROJECT_HOME}/config to get the variables from json.

Issue Priority

Priority: 2

Issue Component

Component: Hop Gui

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions