Context variable vs Global variable

Context variable Global variable
A context variable is a variable which is defined by the user for a particular context. A global variable is a system variable which can be accessed by any module or function. It retains its value after the function or program using it, has completed execution
If you want to pass all of your context variables without explicitly specifying values in the tRunJob, then you will need the same context variables in your child job as your parent job (well, the ones you wish to use in your child job anyway) and tick the "Transmit whole context" tick box. Otherwise you can click the green cross below the Context Param table and explicitly set the context variables you have set up in your child job. This is where you can use Context variables OR globalMap values to pass values. The globalMap is a HashMap. You generally set these values at runtime, although you can force them to be able to be set values from a parameters file like contexts (....but this support is not built in). When retrieving your globalMap parameters you will usually need to cast them
Context variables can be referenced from only one screen but can be passed to another screen using the Navigate function Another scenario where globalMap values are use is with the tFlowToIterate component. When the rows are iterated over, the column values are stored in the globalMap.
Context variables are the variables which can have different values in different environments. You can create a context group which can hold multiple context variables. You need not add each context variable one by one to a job, you can simply add the context group to the job. globalMap variables do not need to be set in a child job, but you can use them. However you cannot receive values in the child job into globalMap. The child job can receive values into Context variables, and those values can be supplied by the parent job's Context variables AND globalMap variables. The child job cannot receive values directly into the globalMap.
These variables are used to make the code production ready. Its means by using context variables, you can move the code in development, test or production environments, it will run in all the environments Global variables hold values that can be accessed anywhere from the app
To access the context variable's value, simply use the variable name e.g. testVar To access the global variable that has the same name, use the disambiguation operator e.g. [@testVar]
Context variables are typically used to pass data between components within a single job while global variables are used to share data across multiple jobs or projects.
context variables are job-specific and defined within the job while global variables are global to the Talend environment and defined in the Administration Center.