Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
simple task, how to map global variable into Output component? I have job, where I do synchronization and after success or failed execution, I want to insert into log table some values from global variables which I have setted in process. I tried to use tMap, but there is compilation error "var cannot be rrsolved to a variable". What is the pattern for this?
Thanks.
R
Your problem is that your DB table is expecting a Date and you are supplying a String. You need to convert your String value to a Date. You can use this included routine/method to convert it in Talend.....
routines.TalendDate.parseDate(pattern, stringDate)
Hi,
Global variables are available using "globalMap.get" method. Here is an example for a String variable:
(String)globalMap.get("yourVariable")
Hi,
that is clear, but I do not know which component can I use for this declaration. Now I am tring use tFlexFlowInput, where I have two columns one for each variable. This tFlexFlowInput is joined with Output table.
Current problem is Type mismatch: cannot convert from STring to date
R.
Your problem is that your DB table is expecting a Date and you are supplying a String. You need to convert your String value to a Date. You can use this included routine/method to convert it in Talend.....
routines.TalendDate.parseDate(pattern, stringDate)
I am having the same issue, How did you generalize to get all global variable values outputted from every component.
even I want to capture all those global variable values in internal audit log table.
for example, tFTPPut knoww what file it uploaded onto FTP, I need to fetch that last once it uploaded successfully & add that into our internal audit log table.
Hi nmodi,
now I am using fFixedFlowInput where for each variable is set one row Column with name and in Value with (String)globalMap.get("MyStringVariable"), (Integer)globalMap.get("MyNumberVariable") or (Date)globalMap.get("MydateVariable"). The rows were created in Edit schema. And this table is mapped with Output component with Insert action on data.
regards,
Roman