Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all
I'm a total newbie into Talend 🙂
I'm using tSSH component in order to execute 2 commands on a Linux server, to get the date + the temperature :
"date +\"%Y-%m-%d %T\"; sensors |grep Package"
This gives me this output :
As you can see, the output gives me 2 lines
In order to be able to use this input for powerBI, I would like to get this output into one signle line.
Basically, what I'm willing to get should look like :
2022-06-09 17:29:55 Package id 0: +44.0 .......
Could you please help me to get this reslut? What is the component I need to use?
I've already tried with tNormalise, tDenormalize but did not manage to get what I'm looking for.
Many thanks in advance for your help! 🙂
Kind regards,
Julien
I've tried with a simple file :
And the Denormalization is working fine :
So I think my issue is focused on the output from the 3 commands
=> maybe the result of these 3 commands are NOT seen as 3 "real" lines ??? 😕
But why??
Here is the tlogrow result of these 3 commands :
I see a single row at the output of the tDenormalize_1 component.
which would mean that the response contains carriage returns ===> Put a tJavaRow to replace the carriage return with ; ===> "\n"-->";"
Sorry, I'm discovering the tJavaRow component, and am not familiar at all with it....
But for sure, there is something around the carriage returns (see my other post : the output of the 3 shell commands seem not seen as 3 real lines).
I've tried something, but doesn't work (there was 0,1% chance it worked.... 😂
Could you please precise how I should use this tJavaRow?
Contact me in private if you still can't find the solution, so as not to pollute the discussion
Many many thanks to you, dear @not specified not specified !!! 😊
Thanks to your help, I've managed to get what I expected, by using this tJavaRow component :
The results of the command are now displayed on a single row, which is what I was looking for.👍
Just on last point (which is not blocking, but would be nice if you had an idea) :
in order to write the result to a file, I'm using tFileOutputDelimited.
But the (little) issue I have is that it gives a blank line between each result :
Do you have any idea how I can delete these empty lines?
Bravoo👏
NB. Next time, to avoid this kind of problem copy the result of your commands and paste in NotePad++ then activate the "show all characters" button to get an idea before developing.
You're a real beast!! 😊
Many thanks again, that worked perfectly with tFilterRow :
I'm now getting the exact result I was looking for, that means :
Perfect!!
Thank you very much again and enjoy your weekend! 😎
Julien