AnsweredAssumed Answered

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

Question asked by B932F9CY on Jul 27, 2018
Latest reply on Aug 1, 2018 by Chris Eicher

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.


How do I circumvent this?