Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello ,
I'm having a problem to get the error caused by setting a wrong value :
Example :
Cost (Integer)
Value Passed : "XXXX"
Here is my output of tLoadContext :
[statistics] connecting to socket on port 4068
[statistics] connected
Setting a value for the key "Cost " has failed. Error message: For input string: "XXXX"
How to get the global Variable that defines the error in the console ?
Hi,
Please try again using implementing the below settings in tContextLoad
Also,
Alternatively try using ImplicitContextLoad from the below tab:
Hello,
It looks like there is a problem in the defined variables in the context.
Are your context variables in your job OR a list of context variables in a context group?
You can try is to type your context in your tJava and hit ctrl+space. This will show you a list of autocomplete options. Your available context variables will be in that list.
Here is online related scenario about: TalendHelpCenter: Reading data from different MySQL databases using dynamically loaded connection pa...
Hope it helps.
Best regards
Sabrina
Hi, here the variables you can use for error in tContextLoad :
((String)globalMap.get("tContextLoad_1_ERROR_MESSAGE"))
((String)globalMap.get("tContextLoad_1_KEY_NOT_INCONTEXT"))
((String)globalMap.get("tContextLoad_1_KEY_NOT_LOADED"))
Send me Love and Kudos
Hello jeremy ,
All of these variable print me Null
What component do i have to use and what link ?
From File "YOUR_Path" what path exactly ??
those variables are AFTER variables(they will be accessible after the component was executed),
i think you can use a tjava linked to the tlContextLoad with a oncomponent error link, and you have to set :
if a vairable loaded, but not in the context : error
if a variable in the context, but not loaded : error
in the basic settings of the component.
and if your tContextLoad is named tContextLoad_1 :
in the tJava :
System.out.println(((String)globalMap.get("tContextLoad_1_ERROR_MESSAGE")));
System.out.println(((String)globalMap.get("tContextLoad_1_KEY_NOT_INCONTEXT")));
System.out.println(((String)globalMap.get("tContextLoad_1_KEY_NOT_LOADED")));
Here is the output :
I want just to get the variable that is not loaded by contextLoad
Because Costing_Date Variable is an int and when i charge it in tLoadContext with "XXXX" the variable is not loaded correctly
I want to get this particular error to the user that added the wrong value 'XXXX'
path of your context file
I'm not defining a group context , i'm declaring variables in context directly how to know the context of job ?