I want to fetch job logs using python sdk. Is there any way to do this?
Page 1 / 1
Kindly try the below code and let me know if it helps.
from streamsets.sdk import ControlHub
sch = ControlHub(credential_id='your_crediential_id', token='your_token_id')
sdc = sch.data_collectors.get(url='http://your_data_collector_hostname:18630')
builder = sch.get_pipeline_builder(engine_type='data_collector', engine_id=sdc.id)
job_id = "my_job_id"
job = builder.get_job(job_id)
logs = job.get_logs()
print(logs)
Thanks & Regards
Bikram_
this didn’t work as builder doesn’t have get_job method.
Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.