Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Paths Relative to workspace

I'm using TIS with a Java project. Is there a variable I can use that represents the current path to the workspace folder. Also can I access the project name?
I want to store my data using relative paths so that I can move the job processing to different machines.
Thanks.
Labels (3)
5 Replies
Anonymous
Not applicable
Author

I'm not sure about the current path to the workspace folder
but if you go to a code box and press CTRL-SPACE you'll get a drop down of the available variables and functions
but, specifically, these are the global variables that show up that will describe your current project and/or job:
projectName
jobName
Anonymous
Not applicable
Author

To get the location of your workspace, you can go to the main toolbar: Window -> Preferences
Then to Talend -> Designer, in the Preferences box
And the value is under "Component default filepath"

If you want to request that the workspace path be made into a global variable, you should report it in the BugTracker: http://www.talendforge.org/bugs/bug_report_advanced_page.php
And chose Severity: Feature from the dropdown box
Anonymous
Not applicable
Author

As a workaround you could try to get the path via the class / classloader .getResource()
Bye
Volker
Anonymous
Not applicable
Author

Anonymous
Not applicable
Author

Hi,
what should the context var return as value if you start you job outside of TOS? In this case you do not have a "workspace" or?
Wouldn't it be better to store your data in a defined (changeable) path?
Bye
Volker