Base Directory

The Base Directory has overarching control over where the framework, and your application, interacts with your File System.

All framework files and directories are created under the Base Directory unless you specify otherwise.

By default, the Base Directory is set to: –

$HOME/project/talend/$CONTEXT/$PROJECT

where $HOME represents the home directory of the user who is running the Job,¬†$CONTEXT represents the Context that the Job is executing in, for example, “Dev“, “Test“, “UAT” or “Prod“, and $PROJECT represents the name of your Project.

The Base Directory is controlled by the parameter baseDir; which is part of the File System Context Group. You can read more on the Framework Context Groups; but for now, we’ll concentrate on baseDir as it is the first Context variable that you are likely to want to change.

There are two ways in which you can change baseDir. You can change it from within the Talend Designer by editing the File System Context Group, or you can set it at runtime by passing it as a parameter.

If you want to amend the default baseDir and be able to run your Job from within Talend Designer, you must set the new value by editing the File System Context Group. If you simply want to change the value at runtime, for example, when you’re deploying to your production environment, then you can simply pass the new value as a runtime parameter.

To learn more about editing Context Groups, read this article on Framework Context Groups.

If you amend any default Context values then you must remember to re-set these each time you import a new version of the Talend Framework.

Context

Context is a fundamental concept of Talend. If you are not yet familiar with Talend and Context, read this article, now.