I am trying to access the AWS ETL Glue job id from the script of that job. This is the RunID that you can see in the first column in the AWS Glue Console, something like jr_5fc6d4ecf0248150067f2
. How do I get it programmatically with pyspark?
I haven't found this documented anywhere but it's passed in as a command line argument.
import sys
from awsglue.utils import getResolvedOptions
args = getResolvedOptions(sys.argv, ['JOB_NAME'])
job_run_id = args['JOB_RUN_ID']
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments