One Star

temp and global variables

What is the difference between the
context.temp which is defined in a job
and the other
globalMap.put("temp",input_row.sal) and to fetch that value use globalMap.get("temp",input_row.sal) ?

which is a hash table of value and key if i m not mistaken.
8 REPLIES
One Star

Re: temp and global variables

Hi
globalMap is a hashtable which has been declared in Java code.
A context variable is just a basic data type.
For example, temp here is just an Integer value.
BTW, don't delete topic.
Regards
Pedro
One Star

Re: temp and global variables

alrit ,Thanx. and point noted.
Could a context.temp or globalMap.get("temp",1) be accessed in sme other job ?
One Star

Re: temp and global variables

Yes.
They can both be available in one job.
Regards
Pedro
One Star

Re: temp and global variables

No.. what i mean is could a context.temp or globalMap.get("temp",1) created in job1 be available or accessible in job2 ?
One Star

Re: temp and global variables

Hi
globalMap can be accesed inside the job only where as the context variable can be accessed in other jobs.
One Star

Re: temp and global variables

Thanx for the reply.....Lijo
Just to confirm could you just tell me the difference in the context Variables in the beow pics....
One Star

Re: temp and global variables

Hi
Its seems like you are confusing urself.
Pic 1. This is like assigning a value to the globalMap acc_no1, this value can be used whithin the job using globalMap.get("acc_no1")
Pic 2. This is the context window for creating context variable for the job.The variable created here cannot be used in any other job until the other has same variable created in the context window.
Pic 3. This is a repository context window. The variable created here can be imported into the local job using the import button in the job specific context tab.This one helps if you have to use the same variable in two jobs there by eliminating the manual creation process.
One Star

Re: temp and global variables

awesome! Thanx for reply lijo!