Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have requirement to read a xml where data is encrypted. I also have a program to decrypt the data i have attached the screenshot.
How can i integrate this program in talend job. Output of this command should be captured as value to column.
I will appreciate anyone one help.
Regards
PK
Sorry, the mistake was mine.
You must change from flow to iterate before to go in the tSystem component.
The job should look like this (here I change tFileInputDelimited by tFixedFlowInput just for the example):
The tFixedFlowInput generate 2 lines with the values "One" and "Two" I'll use later on as parameters for the tSystem.
The tFlowToIterate generates 1 global variable per input field and each variable will have the values from the input flow.
In my example, the schema in the tFixedFlowInput just contains 1 field called "Parameter".
So, the global variable will be called "row49.Parameter" because I used the default configuration for tFlowToIterate but you can choose the variable name if you uncheck the "Use the default (key, value) in global variables" option.
Now the tSystem component can get the parameter from the global variable:
Here is what the command field must look like:
"cmd /c C:/parameter.bat " + ((String)globalMap.get("row49.Parameter"))
And here is the result:
You got it?
Hi,
If you need to run this program from the command line you need to use the tSystem component.
Follow this link to know how to get the result.
Hope this helps.
Thanks for your reply.
How can i pass input column to tSystem command, when i trying to pass as row2.accountNumber i am getting error which i have attached.
new String[]{"cmd","/c","C:\\Users\\212600982\\Desktop\\XML_TEST\\Decription_Xml\\rsa-example-jre_7\\rsa-example-1.0-SNAPSHOT\\bin\\rsa-example.bat C:\\rsa\\private row2.accountNumber"}
If you want to fill the "Command" field dynamicaly you nedd to use the syntax:
"cmd /c" C:\\Users\\212600982\\Desktop\\XML_TEST\\Decription_Xml\\rsa-example-jre_7\\rsa-example-1.0-SNAPSHOT\\bin\\rsa-example.bat C:\\rsa\\private" + row2.accountNumber
As you can see row2.accountNumber must be outside from the "" to get the value of the field, not the string row2.accountNumber.
Thanks for your reply. I tried to pass and test but but no luck, i am getting null for any column i want to pass dynamically, please find screenshot.
tsystem coomand : "cmd /c echo " + row2.accountNumber
Sorry, the mistake was mine.
You must change from flow to iterate before to go in the tSystem component.
The job should look like this (here I change tFileInputDelimited by tFixedFlowInput just for the example):
The tFixedFlowInput generate 2 lines with the values "One" and "Two" I'll use later on as parameters for the tSystem.
The tFlowToIterate generates 1 global variable per input field and each variable will have the values from the input flow.
In my example, the schema in the tFixedFlowInput just contains 1 field called "Parameter".
So, the global variable will be called "row49.Parameter" because I used the default configuration for tFlowToIterate but you can choose the variable name if you uncheck the "Use the default (key, value) in global variables" option.
Now the tSystem component can get the parameter from the global variable:
Here is what the command field must look like:
"cmd /c C:/parameter.bat " + ((String)globalMap.get("row49.Parameter"))
And here is the result:
You got it?
Hi,
Thanks for your help. IT worked.