You are not logged in.
Announcement
Unanswered posts
|
Hi,
Thanks for the quick reply!
I tried what you suggested and it works fine now! ![]()
tRowGenerator -main--> tJavaRow -main--tFlowToIterate--iterate--> tSystem
Thank you very much! ![]()
Best regards,
Gabor Varga
Hi Gabor Varga
Try to use tJavaRow replace tJava, eg:
tRowGenerator -main--> tJavaRow -main--tFlowToIterate--iterate--> tSystem
on tJavaRow:
globalMap.put(''test", input_row.columnName);
Best regards
Shong
Hi,
I would like to use tSystem in same way, but it does not work for me in TOS 4.2RC3. ![]()
For example:
tRowGenerator -> tJava -> tSystem
tJava code: globalMap.put("test", "hello");
tSystem command: "cmd /c echo " + (String)globalMap.get("test")
expected output: hello
actual output: null
Can you check what's wrong?
Thanks in advance!
Gabor Varga
Hello
Thanks for sharing your solutions, but I don't see your image. Can you try to upload it again?
Best regards
shong
I found the solution
We have to use the cmdArray(String[]) instead of command(String)
Have a tjava custom object where you build the String array which contains cmd and its parameters and then put that in the globalMap and get the array from globalMap in tsystem
Thanks Shong.
If i replace all " " with "_" it will definetly work and it would look like
This_is_my_first_tweet.
But i want the spaces to be retained which i can achieve if i use the curl cmd on the cmd promt
curl -u user:pswd -d status="This is my first tweet" http://twitter.com/statuses/update.xml
I was wondering how to get the same result(retained spaces)in Talend tsystem_1 component?
Thanks,
Sahana
Hello guy
To make your job run, you can replace all the " " with "_".
"curl -u user:pswd -d status="+(String)globalMap.get("cur_post").replaceAll(" ","_")+" http://twitter.com/statuses/update.xml"Best regards
shong
I am trying to auto tweet some values from the database to my twitter account every 5 min and i am using the tsystem to the same
"curl -u user:pswd -d status="+(String)globalMap.get("cur_post")+" http://twitter.com/statuses/update.xml"
this works when the text i want to tweet( (String)globalMap.get("cur_post") ) is just a string like :"Testing_1_2_3"
but if my (String)globalMap.get("cur_post") or tweet has spaces in it "Testing 1 2 3" then it tweets only the first word of my text .i.e Testing
i tried all the following
"curl -u user:pswd -d status=Testing 1 2 3 http://twitter.com/statuses/update.xml"
tweets just : Testing
"curl -u user:pswd -d status=\"Testing 1 2 3\" http://twitter.com/statuses/update.xml"
tweets just : "Testing
"curl -u user:pswd -d status=\'Testing 1 2 3\' http://twitter.com/statuses/update.xml"
tweets just : 'Testing
does not work either and i see the following error
curl: (6) Couldn't resolve host '1'
curl: (6) Couldn't resolve host '2'
curl: (6) Couldn't resolve host '3"''
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
Any help or suggestions?