pentaho - Carte Status / Kettle Slave Server Status page shows status for random runs instead of the latest run -
i trying programmatically details of specific execution of transformation
what have tried far
i status of kettle slave server/carte @
http://localhost:8282/kettle/status/ from page, can click on desired transformation , taken page shows details , has link xml output current status of specific execution of transformation. link this:
http://localhost:8282/kettle/transstatus/?name=trans_name&id=carte_ob_id&xml=y the problem
i have transformation has been run multiple times recently. don't have carte_obj_id specific run of transformation. so, can't provide in uri. if try following uri instead:
http://localhost:8282/kettle/transstatus/?name=trans_name&xml=y then status of random execution. not latest 1 or specific one.
the goal
i writing .net gui have code.
httpwebrequest req = (httpwebrequest)webrequest. create(@"http://localhost:8282/kettle/transstatus/? name=trans_name &id=carte_obj_id &xml=y"); req.method = "get"; req.credentials = new networkcredential("cluster", "cluster"); resp = req.getresponse(); xmlresultstream = resp.getresponsestream(); streamreader readstream = new streamreader(xmlresultstream, encoding.utf8); string = readstream.readtoend(); i intend status xml of specific execution of transformation , allow non-pentaho admin user run transformations @ click of button.
thanks in advance. have taken inspiration this article.
update:
i saw this old jira entry bug said fixed. have pdi 5.0 trial version, not sure if fix there.
update 2:
based on suggestion below trying run transformation , fetch carte object id specific execution (so can run other operations (like transstatus etc) based on specific object id).
i tried following uri unexpected error:
http://localhost:8282/kettle/runtrans/?trans= c:%2fprogram%20files%2fpentaho%2fdesign-tools%2fdata-integration%2fsamples%2ftransformations%2fcsv%20input%20-%20reading%20customer%20data%20v2.ktr &filename=c:%2fprogram%20files%2fpentaho%2fdesign-tools%2fdata-integration%2fsamples%2ftransformations%2fcust.txt &level=debuglevel &xml=y what possibly wrong uri?
note following works fine me. doesn't give me carte obj id in result:
http://localhost:8282/kettle/executetrans/?trans= c:%2fprogram%20files%2fpentaho%2fdesign-tools%2fdata-integration%2fsamples%2ftransformations%2fcsv%20input%20-%20reading%20customer%20data%20v2.ktr &filename=c:%2fprogram%20files%2fpentaho%2fdesign-tools%2fdata-integration%2fsamples%2ftransformations%2fcust.txt
i using kettle carte call job execution. example can start job url this: host_ip:host_port/kettle/runjob/?job=job_name&job_param_1=123 xml response this:
<webresult> <result>ok</result> <message>job started</message> <id>549387d0-e621-4b6f-aa63-2783a2116e7c</id> </webresult> the tag id provides carte execution id can use check execution status this: host_ip:host_port/kettle/jobstatus/?name=job_name&id=549387d0-e621-4b6f-aa63-2783a2116e7c
or if want xml response add "&xml=y" url: host_ip:host_port/kettle/jobstatus/?name=job_name&id=549387d0-e621-4b6f-aa63-2783a2116e7c&xml=y
hope helps.
important note. important note start job can use startjob or runjob. difference startjob requires existing job in carte server. while runjob start new job , 1 used in carte server because if server reboots carte server looses history of job/transformation ids
Comments
Post a Comment