Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I am trying to pass an expression in the tMap using context variable. like this
But when I am passing it in the t Map to evaluate its Boolean value its always giving false as an output, whereas if i pass the same expression directly it is giving true for that.
It's never too late
One example:
tDBInput (read all columns) ==(row)==> tFlowToIterate ==(iterate)==> [ your process ]
This will run [ your process ] as many times as you have a row as input (100 times if you have 100 columns for example).
In [your process], you'll be able to use a globalMap variable from the tFlowToIterate to have the current column name.
You can see the documentation of the component here.
Hi,
first remark: context variables are linked to the job, not a component.
second remark: context variables are loaded at startup or with an tLoadContext component or explicitly assigned within the job (such as context.variable = value) (note that from my point of view, only the first use is recommanded).
That being said, what you are trying to do cannot work this way: values in the Context panel will not be evaluated as Java expression.
Could you please explain what exaclty you are trying to do?
Regards
I have a table containing the column names of the source table, and i want to take each column name and pass it in the expression. I will use java for this but i just tried it for one column but it's getting false output.
Let's forgot the context part: why does the first column defined in your tMap doesn't work?
In your job, you have:
row1.designation will have the different values of the input row: it seems to be what you want, doesn't it?
1) The first column works perfectly, but what will i do when i need to pass 100 columns in the same expression.
2) I forgot to join the 2 tables, but after that the same result is showing.
If this is not a good idea, can you tell me how to pass 100 different columns in the expression field in the same expression.
Can't you use a tFlowToIterate to loop over your columns?
i haven't used it before
It's never too late
One example:
tDBInput (read all columns) ==(row)==> tFlowToIterate ==(iterate)==> [ your process ]
This will run [ your process ] as many times as you have a row as input (100 times if you have 100 columns for example).
In [your process], you'll be able to use a globalMap variable from the tFlowToIterate to have the current column name.
You can see the documentation of the component here.
Thankyou for the guidance