title: Pentaho Data Integration "Variable scope type" in Set Variables
body: <p>I have a job running in PDI that is transferring data from different sources to different targets an back for a specific System. This job has a lot of child jobs. Let's call that Job MasterJob1. </p>
  
  <p>We have the same System running for another purpose. Therefore, I want to copy that job in PDI. Here I just have to change a few settings. Let's call that MasterJob2.</p>
  
  <p>To make different variables available for the entire job (also in parent jobs, child jobs and so on of the masterjob), we are using "Set Variables". Here, we have a lot of different variables. Let's say, one variable is called TestVar. At the moment, the "Variable Scope type" of these Variables in MasterJob1 is always set on "Valid in Java Virtual Machine". </p>
  
  <p>According to the PDI Documentation <a href="http://wiki.pentaho.com/display/EAI/Set+Variables" rel="nofollow noreferrer">http://wiki.pentaho.com/display/EAI/Set+Variables</a>, this means, the variables are available everywhere in the Virtual Machine. For my understanding this means, if I copy the job and let the "Variable Scope type" like it is, the Variable TestVar can be written by MasterJob1 but can also be overwritten by MasterJob2.</p>
  
  <p>I definitively want to avoid that MasterJob1 can overwrite Variables of MasterJob2 and vice versa. However, the Variables that are set in MasterJob1 must be everywhere available in MasterJob1 and the Variables in MasterJob2 must be everywhere available in MasterJob2. Therefore I continued reading the documentation. It's says that there exists the "Variable Scope Type" "Valid in the root Job". Is my assumption right, that this is the Variable Scope Type that I need to use? </p>
  
  <p>Unfortunately I do not have that much experience with this and I hope that you can tell me if that is the right way?! Creating a test environment will take a some days for me. Therefore I hope that you can give me an easy "Yes go for it" or the right solution.</p>