PDA

View Full Version : Fixed Input step - Filename problem



418nicr
05-19-2010, 04:28 PM
Hi! I have a fixed input file step which works fine when I specify the absolute
path + filename without any variables i.e: c:\dirA\dirB\myFile.txt

but when I use a variable in the filename input field of the step (in version 3.2.0 GA )

I get weird behavior. I have a variable named "processingDir" and a constant file name: so the field contains: ${processingDir}\myFile.txt

Load file content 3.0 - ERROR (version 3.2.0-GA, build 10572 from 2009-05-12 08.45.26 by buildguy) : java.io.FileNotFoundException: \devsandbox\kettle\data-integration\C:\dirA\dirB\myFile.txt (The filename, directory name, or volume label syntax is incorrect)

So, basically it seems the problem is with the handling of the filename from the step. Spoon/kettle always try to use the path as relative to kettle_home instead of allowing an absolute path (when using variables).

I've looked at the source and couldnt figure it out.
In the transformation xml file, the filename node is <filename>${processingDir}\myFile.txt</filename>

Anyone?

418nicr
05-19-2010, 04:56 PM
I tried with file:/ before the variable name and it almost worked. I ended up with
\dirA\dirB\myFile.txt

but still not working since the c: got removed from the filename by kettle/spoon

418nicr
05-19-2010, 05:03 PM
Also, in my logs I see this entry:
- Load file content.2 - Opened file with name [file:/C:/dirA/dirB/myFile2.txt]

which is another "Fixed input" step and this one, configured the same way except the file name, seems to initialize correctly

418nicr
05-19-2010, 05:10 PM
and if I remove all other Fixed input step to end up with only one....then it works...without changing the filename input field.

Why would having multiple Fixed input file step mess things up??