Uploaded image for project: 'Pentaho Data Integration - Kettle'
  1. Pentaho Data Integration - Kettle
  2. PDI-17478

Can't use directory path variables on Get data from XML step

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Severity: High
    • Resolution: Fixed
    • Affects Version/s: 8.1.0 GA
    • Fix Version/s: 8.3.0 GA
    • Component/s: Step
    • Labels:
    • Environment:
       Pentaho Data Integration 8.1.0.0-365 on Linux, Debian-based.
    • Story Points:
      0
    • PDI Sub-component:
    • Notice:
      When an issue is open, the "Fix Version/s" field conveys a target, not necessarily a commitment. When an issue is closed, the "Fix Version/s" field conveys the version that the issue was fixed in.
    • Steps to Reproduce:
      Hide
      1. Create and save a transformation with a Get data from XML step and a static input step.
      2. The static input has one field indicating the path for a XML file using path variables (e.g. ${Internal.Job.Filename.Directory})
      3. Go to Get data from XML settings and check the checkbox XML Source is a filename.
      4. Run the transformation.
      Show
      Create and save a transformation with a Get data from XML step and a static input step. The static input has one field indicating the path for a XML file using path variables (e.g. ${Internal.Job.Filename.Directory}) Go to Get data from XML settings and check the checkbox XML Source is a filename . Run the transformation.

      Description

      When using the Get data from XML step, with the option XML Source is a filename checked, the transformation throws an error saying it can't read the file because it doesn't parse the directory path variables within. Example:

      The field xml_source has the value ${Internal.Job.Filename.Directory}/xml/client1.xml

      When using xml_source as the source for this step, the error thrown is:

      xml.0 - org.apache.commons.vfs2.FileNotFoundException: Could not read from "file:///home/user/files/.data-integration/${Internal.Job.Filename.Directory}/xml/client1.xml" because it is not a file.
      

      For some unknown reason, it ignores the path variable and looks for the file in the root directory where PDI is installed. in fact, it doesn't matter the value of xml_source, it will always try to find the file in the root directory.

      It's important to note that if I uncheck the XML Source is a filename option and add the ${Internal.Job.Filename.Directory}/xml/client1.xml directly into the step, then it works properly.

        Attachments

          Activity

            People

            Assignee:
            rrosinha Ricardo Rosinha
            Reporter:
            filipegatti Filipe
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: