Попробуйте это:
message = { "source": "datapipeline",
"application_nm": "omni",
"severity": "2",
"batch_run_start_dttm": "$actualStartTime",
"batch_run_end_dttm": "actualEndTime",
"batch_run_status_cd": "failed",
"job_orchestration_id": "NA",
"stage_nm": "NA",
"stage_start_dttm": "NA",
"stage_end_dttm": "NA",
"stage_status_cd": "failed",
"job_run_id": "NA",
"source_nm": "NA",
"target_nm": "NA",
"source_details": "NA",
"target_details": "NA",
"msg": "These mentioned hours having difference more than 50% from previous week:" +"%s" ,
"counts":"0",
"notes": "After hourly comparison check, the above mentioned hours is having difference more than 50%",
"list": list # this is how to do it
}
Кстати, очень плохая идея назвать переменную «list», которая конфликтует со встроенной функцией list()
.