How to get job name from job file in azkaban 3.0
2 answers
The properties of the Azkaban runtime are stored in the file specified by the JOB_PROP_FILE env variable . Read this file in your python program and get the required properties.
import os
azkaban_job_prop_file = os.environ["JOB_PROP_FILE"]
with open(azkaban_job_prop_file,'r') as f:
print f.readline()
we can infer the job names from these properties azkaban.flow.nested.path and azkaban.job.metadata.file
azkaban.flow.nested.path -> Use this if the job is part of an embedded DAG.
0
source to share