Search code examples
etldatastage

datastage parameter for file directory not working


I am creating an extract from sequential file. I created a parameter with the correct file location and when I try to "View Data", it says it can't find the file. If I hard code the location it finds the file and I am able to "View Data".

example:

#filedirectory# = aaa/bbb/ccc/

so my entry for "File" is #filedirectory#filename.txt and this does not work

however, the following does work aaa/bbb/ccc/filename.txt

Any ideas what would cause this?


Solution

  • Try using the absolute path. Start with a / and the root directory.

    Second point is that the parameter itself does not have "#". The "#" are only needed to reference it - in the Sequential File stage. So name it filedirectory when you define it in the job.

    Recommendation: As filedirectory will probably be used throughout your project I recommand using a ParameteSet.